最終更新日:2023年2月14日
View sign_in_with_google.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
import 'package:google_sign_in/google_sign_in.dart'; | |
import 'package:firebase_auth/firebase_auth.dart'; | |
class AuthScreen extends StatelessWidget { | |
static final googleLogin = GoogleSignIn( | |
scopes: [ | |
'email', | |
'https://www.googleapis.com/auth/contacts.readonly', | |
], | |
); |
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 routing_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
import 'package:flutter/material.dart'; | |
void main() => runApp(App()); | |
class App extends StatefulWidget { | |
@override | |
_AppState createState() => _AppState(); | |
} | |
class _AppState extends State<App> with WidgetsBindingObserver { |
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 # これ |
OlderNewer