π
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(App()); | |
| } | |
| class App extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
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:provider/provider.dart'; | |
| void main() { | |
| runApp(App()); | |
| } | |
| const double _containerWidth = 450.0; | |
| class App extends StatelessWidget { |
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_tutorials/common/ui/widgets/app_alert_dialog.dart'; | |
| import 'package:flutter_tutorials/file-upload-service-tutorial/data/services/permission/permission_service.dart'; | |
| import 'package:permission_handler/permission_handler.dart'; | |
| class PermissionHandlerPermissionService implements PermissionService { | |
| @override | |
| Future<PermissionStatus> requestCameraPermission() async { | |
| return await Permission.camera.request(); | |
| } |
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 'dart:math'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_image_compress/flutter_image_compress.dart'; | |
| import 'package:flutter_tutorials/avatar-uploader-tutorial/data/services/media/media_service_interface.dart'; | |
| import 'package:flutter_tutorials/avatar-uploader-tutorial/data/services/permission/permission_service.dart'; | |
| import 'package:flutter_tutorials/avatar-uploader-tutorial/data/services/service_locator.dart'; | |
| import 'package:image_picker/image_picker.dart'; | |
| import 'package:path_provider/path_provider.dart' as path_provider; |
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/cupertino.dart'; | |
| import 'package:flutter_tutorials/avatar-uploader-tutorial/data/services/media/media_service_interface.dart'; | |
| import 'package:flutter_tutorials/avatar-uploader-tutorial/data/services/service_locator.dart'; | |
| import 'package:flutter_tutorials/avatar-uploader-tutorial/ui/widgets/avatar_container.dart'; | |
| import 'package:flutter_tutorials/avatar-uploader-tutorial/ui/widgets/image_picker_action_sheet.dart'; | |
| class AvatarUploader extends StatefulWidget { | |
| @override |
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'; | |
| class TabBarDemo extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| home: DefaultTabController( | |
| length: 2, | |
| child: Scaffold( | |
| appBar: AppBar( |
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 ThemeSwitcher extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Consumer<ThemeProvider>( | |
| builder: (c, themeProvider, _) => SizedBox( | |
| height: (_containerWidth - (17 * 2) - (10 * 2)) / 3, | |
| child: GridView.count( | |
| physics: const NeverScrollableScrollPhysics(), | |
| crossAxisSpacing: 10, | |
| crossAxisCount: appThemes.length, |
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 AppColors { | |
| static List<Color> primaryColors = const [ | |
| Color(0xffd23156), | |
| Color(0xff16b9fd), | |
| Color(0xff13d0c1), | |
| Color(0xffe5672f), | |
| Color(0xffb73d99), | |
| ]; | |
| static Color getShade(Color color, {bool darker = false, double value = .1}) { |
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(App()); | |
| } | |
| class App extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
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 App extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MultiProvider( | |
| providers: [ | |
| ChangeNotifierProvider( | |
| create: (_) => ThemeProvider() | |
| ), | |
| ], | |
| child: Consumer<ThemeProvider>( |
OlderNewer