#dartlang #FlutterDev Easy Win #43:
⚡️ Want to serialize / deserialize your enums? Use extensions with maps.
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @override |
| import 'dart:math'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:scroll_to_index/scroll_to_index.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { |
| import 'dart:math'; | |
| import 'package:flutter/material.dart'; | |
| // To use this package, run: | |
| // dart pub add page_flip_builder | |
| import 'package:page_flip_builder/page_flip_builder.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } |
| # Set the platform at the top | |
| platform :osx, '10.15' | |
| # Rest of the pod file | |
| # Update post_install step | |
| post_install do |installer| | |
| # Ensure pods use the minimum deployment target set above | |
| # https://stackoverflow.com/a/64385584/436422 | |
| pods_project = installer.pods_project |
| # Set the platform at the top | |
| platform :ios, '13.0' | |
| # Rest of the pod file | |
| # Update post_install step | |
| post_install do |installer| | |
| # Ensure pods use the minimum deployment target set above | |
| # https://stackoverflow.com/a/64385584/436422 | |
| pods_project = installer.pods_project |
| 0 verbose cli /usr/local/bin/firebase /snapshot/firepit/node_modules/npm/bin/npm-cli | |
| 1 info using [email protected] | |
| 2 info using [email protected] | |
| 3 timing npm:load:whichnode Completed in 1ms | |
| 4 timing config:load:defaults Completed in 3ms | |
| 5 timing config:load:file:/snapshot/firepit/node_modules/npm/npmrc Completed in 1ms | |
| 6 timing config:load:builtin Completed in 1ms | |
| 7 timing config:load:cli Completed in 2ms | |
| 8 timing config:load:env Completed in 1ms | |
| 9 timing config:load:file:/Users/andrea/work/codewithandrea/flutter-firebase-masterclass/complete-flutter-course-scratch/ecommerce_app/functions/.npmrc Completed in 1ms |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| // This widget is the root of your application. |
| import 'package:firebase_auth/firebase_auth.dart' hide EmailAuthProvider; | |
| import 'package:firebase_core/firebase_core.dart'; | |
| import 'package:firebase_ui_auth/firebase_ui_auth.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:go_router/go_router.dart'; | |
| import 'package:simple_auth_flutter_firebase_ui/firebase_options.dart'; | |
| void main() async { | |
| WidgetsFlutterBinding.ensureInitialized(); | |
| await Firebase.initializeApp( |
| // Note: this example needs the flutter_staggered_grid_view and cached_network_image packages to run correctly. | |
| import 'dart:math'; | |
| import 'package:cached_network_image/cached_network_image.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; | |
| void main() { | |
| runApp(const MyApp()); |