View scroll_view_under_container.dart
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 ScrollViewUnderContainer extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Column( | |
children: [ | |
Expanded( | |
child: ListView( | |
children: [ | |
for (int i = 0; i < 100; i++) |
View user_providers.dart
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 Tweet { | |
final String id; | |
final String content; | |
} | |
// Three response classes includes tweets. | |
class FeedResponse { | |
final List<Tweet> tweets; | |
} |
View nullable_boolean.dart
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
bool nullableBoolean() { | |
return null; | |
} | |
void main() { | |
final nullable = nullableBoolean(); | |
if (nullable == false) { | |
print('aa'); | |
} else { | |
print('bb'); |
View sample_clear.dart
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
final authStateProvider = StateProvider<bool>( | |
(ref) => false, | |
); | |
final notificationsStateProvider = StateProvider<List<Notification>?>( | |
(ref) { | |
final authorized = ref.watch(authStateProvider).state; | |
if (authorized) { | |
// return ? | |
} |
View ml_kit_sample.dart
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 SampleScreen extends StatefulWidget { | |
const SampleScreen({ | |
Key? key, | |
}) : super(key: key); | |
@override | |
_SampleScreenState createState() => _SampleScreenState(); | |
} | |
class _SampleScreenState extends State<SampleScreen> { |
View flutter-action_cache.yml
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
- name: 'Setup flutter environment' | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '2.10.3' | |
channel: 'stable' | |
cache: true # これ |
View pub-cache-action_cache.yml
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
- name: Cache pubspec dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
${{ env.FLUTTER_HOME }}/.pub-cache | |
**/.packages | |
**/.flutter-plugins | |
**/.flutter-plugin-dependencies | |
**/.dart_tool/package_config.json | |
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }} |
View build_runner-action_cache.yml
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
- name: Cache build runner | |
uses: actions/cache@v2 | |
with: | |
path: | | |
**/.dart_tool/build | |
key: build-runner-${{ hashFiles('**/asset_graph.json') }}-${{ hashFiles('**/pubspec.lock') }} | |
restore-keys: | | |
build-runner- |
View install-flutter_cache.yml
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
- name: 'Setup flutter environment' | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '2.10.3' | |
channel: 'stable' | |
cache: true | |
- name: 'Cache pubspec dependencies' | |
uses: actions/cache@v2 | |
with: |
View sample_widget.dart
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 MyGreatestWidget extends StatelessWidget { | |
const MyGreatestWidget({ | |
Key? key, | |
required this.onPressed, | |
}) : super(key: key); | |
final ValueCallback<String> onPressed; | |
@override | |
Widget build(BuildContext context) { |
OlderNewer