•  


GitHub - firebase/snippets-flutter at revert-28-nohe427-patch-1
Skip to content

firebase/snippets-flutter

 
 

Repository files navigation

Firebase Flutter Snippets

This repository holds code snippets used in Flutter documentation on firebase.google.com .

These snippets are part of our documentation and best read in the context of a documentation page rather than used directly.

Each snippet has a "region tag" which is defined by // [START tag] and // [END tag] comments. The code between the tags can be included in our documentation. Keeping the code on GitHub, rather than hard-coded into the HTML of our documentation, allows us to ensure the code is correct and up to date.

Set up / Running Instructions - WIP

  • installed flutter, intellij, intellij plugins
  • created firebase project, downloaded firebase CLI, installed flutterfirecli
  • flutter create firestore-snippets && cd firestore-snippets
  • flutterfire-configure

Snippet structure

Note : Most snippets follow this structure, but in some cases multiple snippets are located in a single function. In this case, the function name represents which snippet the function name starts on.

Each Firebase product (that requires Flutter snippets) has its own file located in the dir apps/firestore_snippets/lib/snippets .

Each of these files defines a class called [Firebase Product Name]Snippets. These classes have a separate function for each snippet. These functions follow the naming convention of firebaseDocsPageName_snippetTitle . For example: FirestoreSnippets.getStarted_addData . Each snippet is also wrapped by comments which define the beginning and ending of the snippet, and generally excludes the function names. The code in this region, between the two comments, is the code that appears in the Firebase documentation.

Example:

See translated snippet in the Firebase documentation

  void
 getStarted_addData
() 
async
 {
  
// [START get_started_add_data_1]

  // Create a new user with a first and last name

  final
 user 
=
 <
String
, 
dynamic
>
{
    
"first"
:
 "Ada"
,
    
"last"
:
 "Lovelace"
,
    
"born"
:
 1815

  };

  
// Add a new document with a generated ID

  db.
collection
(
"users"
).
add
(user).
then
((
DocumentReference
 doc) 
=>

      print
(
'DocumentSnapshot added with ID: ${
doc
.
id
}'
));
  
// [END get_started_add_data_1]

}

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본