This file contains hidden or 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 '../extensions/extensions.dart'; | |
| typedef AnimatedGridBuilder<T> = Widget Function( | |
| BuildContext, T item, AnimatedGridDetails details); | |
| class AnimatedGrid<T> extends StatelessWidget { | |
| /// An animated grid the animates when the items change sort. | |
| const AnimatedGrid({ |
This file contains hidden or 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
| // MIT License | |
| // | |
| // Copyright (c) 2019 Simon Lightfoot | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: |
This file contains hidden or 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'; | |
| class MockFirestore extends Mock implements FirebaseFirestore {} | |
| class MockCollectionReference extends Mock implements CollectionReference {} | |
| class MockDocumentReference extends Mock implements DocumentReference {} | |
| class MockDocumentSnapshot extends Mock implements DocumentSnapshot {} |
This file contains hidden or 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 RegexConstants { | |
| static RegexConstants _instance; | |
| static RegexConstants get instance { | |
| if (_instance == null) { | |
| _instance = RegexConstants._init(); | |
| } | |
| return _instance; | |
| } | |
| RegexConstants._init(); |
This file contains hidden or 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/widgets.dart'; | |
| class TextEditingControllerBuilder extends StatefulWidget { | |
| /// Exposes a [TextEditingController] to the child, which allows | |
| /// us to convert any [TextField] into a declarative version. | |
| /// | |
| /// Typically used for wiring up many state fields to form inputs | |
| /// and making sure everything stays in sync. | |
| /// | |
| /// If [text] is updated, the consuming [TextField] will also be updated. |
This file contains hidden or 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_hooks/flutter_hooks.dart'; | |
| import 'package:state_notifier/state_notifier.dart'; | |
| T useStateNotifier<T>(StateNotifier<T> notifier) { | |
| final state = useState<T>(null); | |
| useEffect(() { | |
| return notifier.addListener((s) => state.value = s); | |
| }, [notifier]); |
This file contains hidden or 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
| // MIT License | |
| // | |
| // Copyright (c) 2020 Simon Lightfoot | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: |
This file contains hidden or 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( | |
| home: Scaffold( | |
| body: Center( |
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build_web: |
NewerOlder