This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:developer' as devtools show log; | |
extension Log on Object { | |
void log() => devtools.log(toString()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StatusCategoryButton extends StatelessWidget { | |
const StatusCategoryButton({ | |
required this.icon, | |
required this.title, | |
Key? key, | |
}) : super(key: key); | |
final String icon; | |
final String title; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return (jsonDecode(response.body) as List) | |
.map((i) => PostModel.fromJson(jsonEncode(i))) | |
.toList(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:cloud_firestore/cloud_firestore.dart'; | |
import 'package:flutter/material.dart'; | |
class DisplayCollection extends StatefulWidget { | |
@override | |
_DisplayCollectionState createState() => _DisplayCollectionState(); | |
} | |
class _DisplayCollectionState extends State<DisplayCollection> { | |
final Ref = Firestore.instance.collection("Countries"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Elevated Button', | |
home: FlutterExample(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
const Color PRIMARY_COLOR = Colors.indigo; | |
const Color ACCENT_COLOR = Colors.indigoAccent; | |
const Color BACKGROUND_COLOR = Colors.grey; | |
ThemeData _buildTheme() { | |
final ThemeData base = ThemeData.light(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: HomePage(), |