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(MaterialApp(home: MyApp())); | |
| } | |
| class MyApp extends StatefulWidget { | |
| @override | |
| State<MyApp> createState() => _MyAppState(); | |
| } |
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:http/http.dart' as http; | |
| Future<String> getIdToken({bool? force}) async { | |
| // fetch update token | |
| return "abc*******"; | |
| } | |
| Future<void> main() async { | |
| final client = http.Client(); | |
| final token = await getIdToken(); |
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
| GridView.builder( | |
| itemCount: fileList.length, | |
| gridDelegate: | |
| const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3), | |
| itemBuilder: (BuildContext context, int i) { | |
| return Container( | |
| padding: const EdgeInsets.all(10), | |
| child: Stack( | |
| children: <Widget>[ |
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
| Future pickImageFromGallery() async { | |
| XFile? pickedImage = await picker.pickImage(source: ImageSource.gallery); | |
| setState(() { | |
| File? file = File(pickedImage!.path); | |
| List<File?> fileList.add(file); | |
| }); | |
| } |
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
| Query( | |
| options: QueryOptions( | |
| document: gql(query), | |
| variables: const <String, dynamic>{"code": "AF"}), | |
| builder: (result, {fetchMore, refetch}) { | |
| if (result.isLoading) { | |
| return const Center( | |
| child: CircularProgressIndicator(), | |
| ); | |
| } |
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
| StoryView( | |
| storyItems: [ | |
| for (int i = widget.index; i < widget.model.length; i++) | |
| StoryItem.inlineImage( | |
| imageFit: BoxFit.contain, | |
| caption: const Text( | |
| "Caption Here", | |
| style: TextStyle( | |
| color: Colors.white, | |
| backgroundColor: Colors.black, |
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
| RotationTransition( | |
| turns: base, | |
| child: DashedCircle( | |
| gapSize: gap.value, | |
| dashes: 20, | |
| color: Theme.of(context).primaryColor, | |
| child: RotationTransition( | |
| turns: reverse, | |
| child: Padding( |
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 'dart:io'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:hive/hive.dart'; | |
| import './data_model.dart'; | |
| import 'package:path_provider/path_provider.dart' as pathProvider; | |
| import 'homepage.dart'; | |
| void main() async { |
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 'package:flutter_hive/data_model.dart'; | |
| import 'package:hive/hive.dart'; | |
| class HomePage extends StatefulWidget { | |
| const HomePage({Key? key}) : super(key: key); | |
| @override | |
| State<HomePage> createState() => _HomePageState(); | |
| } |
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
| // GENERATED CODE - DO NOT MODIFY BY HAND | |
| part of 'data_model.dart'; | |
| // ************************************************************************** | |
| // TypeAdapterGenerator | |
| // ************************************************************************** | |
| class DataModelAdapter extends TypeAdapter<DataModel> { | |
| @override |
NewerOlder