diff --git a/analysis_options.yaml b/analysis_options.yaml index 0d29021..d54b87e 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -26,3 +26,6 @@ linter: # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options +analyzer: + errors: + invalid_annotation_target: ignore \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b5228b8..cf3acc5 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,4 +1,5 @@ + UIApplicationSupportsIndirectInputEvents + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSAppTransportSecurity + + NSAllowsArbitraryLoadsInWebContent + + diff --git a/lib/http/http.dart b/lib/http/http.dart new file mode 100644 index 0000000..6cf8da9 --- /dev/null +++ b/lib/http/http.dart @@ -0,0 +1,30 @@ +import 'package:dio/dio.dart'; +import 'package:flutter_dotenv/flutter_dotenv.dart'; +import 'package:logger/logger.dart'; + +var logger = Logger(printer: PrettyPrinter()); + +class Http { + final Dio dio = Dio(); + + final String baseUrl = dotenv.env['BASE_URL'] ?? ''; + + Http() { + dio.options.baseUrl = baseUrl; + dio.options.connectTimeout = const Duration(seconds: 60); + dio.options.receiveTimeout = const Duration(seconds: 60); + dio.interceptors.add(LogInterceptor( + request: true, + responseBody: true, + requestBody: true, + error: true, + )); + } + + Future get(String url) async { + Response response; + response = await dio.get(baseUrl + url); + logger.i(response.data.toString()); + return response.data; + } +} diff --git a/lib/main.dart b/lib/main.dart index f87b093..ca0a3a4 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,13 +2,18 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:go_router/go_router.dart'; import 'providers/transaction_provider.dart'; -import 'screens/home_screen.dart'; +import 'screens/home/home_screen.dart'; import 'screens/make_payment_screen.dart'; import 'screens/history_screen.dart'; import 'screens/profile_screen.dart'; import 'theme/app_theme.dart'; +import 'package:flutter_dotenv/flutter_dotenv.dart'; -void main() { +const String testEnv = "assets/.env"; +const String liveEnv = "assets/.env"; + +void main() async { + await dotenv.load(fileName: testEnv); runApp(const MyApp()); } @@ -17,49 +22,43 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return ChangeNotifierProvider( - create: (_) => TransactionProvider(), - child: MaterialApp.router( - title: 'QPay', - theme: AppTheme.lightTheme, - routerConfig: GoRouter( - initialLocation: '/', - routes: [ - ShellRoute( - builder: (context, state, child) { - return ScaffoldWithNavBar(child: child); - }, - routes: [ - GoRoute( - path: '/', - builder: (context, state) => const HomeScreen(), - ), - GoRoute( - path: '/make-payment', - builder: (context, state) => const MakePaymentScreen(), - ), - GoRoute( - path: '/history', - builder: (context, state) => const HistoryScreen(), - ), - GoRoute( - path: '/profile', - builder: (context, state) => const ProfileScreen(), - ), - ], - ), - ], - ), + return MaterialApp.router( + title: 'QPay', + theme: AppTheme.lightTheme, + routerConfig: GoRouter( + initialLocation: '/', + routes: [ + ShellRoute( + builder: (context, state, child) { + return ScaffoldWithNavBar(child: child); + }, + routes: [ + GoRoute( + path: '/', + builder: (context, state) => const HomeScreen(), + ), + GoRoute( + path: '/make-payment', + builder: (context, state) => const MakePaymentScreen(), + ), + GoRoute( + path: '/history', + builder: (context, state) => const HistoryScreen(), + ), + GoRoute( + path: '/profile', + builder: (context, state) => const ProfileScreen(), + ), + ], + ), + ], ), ); } } class ScaffoldWithNavBar extends StatelessWidget { - const ScaffoldWithNavBar({ - super.key, - required this.child, - }); + const ScaffoldWithNavBar({super.key, required this.child}); final Widget child; diff --git a/lib/screens/home/home_controller.dart b/lib/screens/home/home_controller.dart new file mode 100644 index 0000000..ba6fe78 --- /dev/null +++ b/lib/screens/home/home_controller.dart @@ -0,0 +1,75 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/material.dart'; +import 'package:logger/logger.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:qpay/http/http.dart'; + +part 'home_controller.freezed.dart'; +part 'home_controller.g.dart'; + +class HomeScreenModel { + List transactions = []; + List categories = []; + dynamic account = {}; + dynamic profile = {}; + bool isLoading = false; + bool isLoggedIn = false; + String? errorMessage; +} + +@freezed +abstract class Category with _$Category { + const factory Category({ + required String name, + required String description, + required String? image, + required String label, + }) = _Category; + + factory Category.fromJson(Map json) => + _$CategoryFromJson(json); +} + +var logger = Logger(printer: PrettyPrinter()); + +class HomeController extends ChangeNotifier { + + final HomeScreenModel model = HomeScreenModel(); + final Http http = Http(); + + Future getCategories() async { + // activate skeletonizer + model.categories = getFakeCategoryData(); + // Simulate fetching categories + try { + model.isLoading = true; + List response = await http.get('/categories'); + model.categories = response.map((e) => Category.fromJson(e)).toList(); + } on DioException catch (e) { + logger.e(e); + model.errorMessage = e.type.name; + model.categories = []; + } + + model.isLoading = false; + notifyListeners(); + } + + // required by skeletonizer + List getFakeCategoryData() { + return [ + Category( + name: 'Electricity', + description: 'Pay your electricity bills easily', + image: 'assets/images/electricity.png', + label: 'Electricity', + ), + Category( + name: 'Internet', + description: 'Pay your internet bills easily', + image: 'assets/images/internet.png', + label: 'Internet', + ), + ]; + } +} diff --git a/lib/screens/home/home_controller.freezed.dart b/lib/screens/home/home_controller.freezed.dart new file mode 100644 index 0000000..33e182d --- /dev/null +++ b/lib/screens/home/home_controller.freezed.dart @@ -0,0 +1,157 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'home_controller.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$Category { + + String get name; String get description; String? get image; String get label; +/// Create a copy of Category +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$CategoryCopyWith get copyWith => _$CategoryCopyWithImpl(this as Category, _$identity); + + /// Serializes this Category to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Category&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.image, image) || other.image == image)&&(identical(other.label, label) || other.label == label)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,description,image,label); + +@override +String toString() { + return 'Category(name: $name, description: $description, image: $image, label: $label)'; +} + + +} + +/// @nodoc +abstract mixin class $CategoryCopyWith<$Res> { + factory $CategoryCopyWith(Category value, $Res Function(Category) _then) = _$CategoryCopyWithImpl; +@useResult +$Res call({ + String name, String description, String? image, String label +}); + + + + +} +/// @nodoc +class _$CategoryCopyWithImpl<$Res> + implements $CategoryCopyWith<$Res> { + _$CategoryCopyWithImpl(this._self, this._then); + + final Category _self; + final $Res Function(Category) _then; + +/// Create a copy of Category +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? description = null,Object? image = freezed,Object? label = null,}) { + return _then(_self.copyWith( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable +as String?,label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// @nodoc +@JsonSerializable() + +class _Category implements Category { + const _Category({required this.name, required this.description, required this.image, required this.label}); + factory _Category.fromJson(Map json) => _$CategoryFromJson(json); + +@override final String name; +@override final String description; +@override final String? image; +@override final String label; + +/// Create a copy of Category +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$CategoryCopyWith<_Category> get copyWith => __$CategoryCopyWithImpl<_Category>(this, _$identity); + +@override +Map toJson() { + return _$CategoryToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Category&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.image, image) || other.image == image)&&(identical(other.label, label) || other.label == label)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,description,image,label); + +@override +String toString() { + return 'Category(name: $name, description: $description, image: $image, label: $label)'; +} + + +} + +/// @nodoc +abstract mixin class _$CategoryCopyWith<$Res> implements $CategoryCopyWith<$Res> { + factory _$CategoryCopyWith(_Category value, $Res Function(_Category) _then) = __$CategoryCopyWithImpl; +@override @useResult +$Res call({ + String name, String description, String? image, String label +}); + + + + +} +/// @nodoc +class __$CategoryCopyWithImpl<$Res> + implements _$CategoryCopyWith<$Res> { + __$CategoryCopyWithImpl(this._self, this._then); + + final _Category _self; + final $Res Function(_Category) _then; + +/// Create a copy of Category +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? description = null,Object? image = freezed,Object? label = null,}) { + return _then(_Category( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable +as String?,label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + +} + +// dart format on diff --git a/lib/screens/home/home_controller.g.dart b/lib/screens/home/home_controller.g.dart new file mode 100644 index 0000000..6c26abc --- /dev/null +++ b/lib/screens/home/home_controller.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'home_controller.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_Category _$CategoryFromJson(Map json) => _Category( + name: json['name'] as String, + description: json['description'] as String, + image: json['image'] as String?, + label: json['label'] as String, +); + +Map _$CategoryToJson(_Category instance) => { + 'name': instance.name, + 'description': instance.description, + 'image': instance.image, + 'label': instance.label, +}; diff --git a/lib/screens/home_screen.dart b/lib/screens/home/home_screen.dart similarity index 60% rename from lib/screens/home_screen.dart rename to lib/screens/home/home_screen.dart index 9850937..73e60ab 100644 --- a/lib/screens/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:qpay/screens/home/home_controller.dart'; import 'package:skeletonizer/skeletonizer.dart'; import 'dart:async'; @@ -17,13 +18,19 @@ class _HomeScreenState extends State final List> _animations = []; final List> _alignListAnimations = []; - late bool _enabled = true; + late final bool _enabled = true; late bool _loading = true; Timer? _loadingTimer; + bool get _isLoggedIn => true; + + final HomeController homeController = HomeController(); + @override void initState() { super.initState(); + + homeController.getCategories(); _controller = AnimationController( duration: const Duration(milliseconds: 600), vsync: this, @@ -68,6 +75,23 @@ class _HomeScreenState extends State }); } + void _showErrorSnackBar(String? message) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(message.toString()), + behavior: SnackBarBehavior.floating, + ), + ); + } + + int _getCategoryIndex(String name) { + return homeController.model.categories.indexWhere((e) => e.name == name); + } + + bool _isCategoryOdd(String name) { + return _getCategoryIndex(name) % 2 != 0; + } + @override void dispose() { _loadingTimer?.cancel(); @@ -84,7 +108,7 @@ class _HomeScreenState extends State slivers: [ SliverAppBar( floating: true, - title: const Text('QPay'), + title: Image(image: AssetImage('assets/icon.png'), width: 85), actions: [ IconButton( icon: const Icon(Icons.notifications_outlined), @@ -98,110 +122,100 @@ class _HomeScreenState extends State child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - AlignTransition( - alignment: _alignAnimation, - child: Skeletonizer( - enabled: _loading, - child: Text( - "USD 4.02", - style: TextStyle( - fontSize: 30, - fontWeight: FontWeight.bold, + if (_isLoggedIn) + AlignTransition( + alignment: _alignAnimation, + child: Skeletonizer( + enabled: _loading, + child: Column( + children: [ + Text( + "Vusumuzi Khoza", + style: TextStyle(fontSize: 15), + ), + Text( + "USD 4.02", + style: TextStyle( + fontSize: 30, + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 20), + ], ), ), ), - ), - const SizedBox(height: 20), - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - SlideTransition( - position: _animations[0], - child: FilledButton( - style: ButtonStyle( - backgroundColor: WidgetStateProperty.all( - Theme.of( - context, - ).colorScheme.primary.withValues(alpha: 0.9), - ), - padding: WidgetStateProperty.all( - const EdgeInsets.symmetric( - vertical: 17.5, - horizontal: 30, - ), - ), - ), - onPressed: onPressed, - child: Row( + ListenableBuilder( + listenable: homeController, + builder: (context, child) { + if (homeController.model.errorMessage != null) { + WidgetsBinding.instance.addPostFrameCallback((_) { + _showErrorSnackBar( + homeController.model.errorMessage, + ); + }); + } + return Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Icon(Icons.electric_bolt, color: Colors.white), - const SizedBox(width: 8), - const Text( - 'Electricity', - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, + ...homeController.model.categories.map( + (e) => Skeletonizer( + enabled: homeController.model.isLoading, + child: SlideTransition( + position: _animations[0], + child: FilledButton( + style: ButtonStyle( + backgroundColor: + WidgetStateProperty.all( + _isCategoryOdd(e.name) + ? Theme.of(context) + .colorScheme + .secondary + .withValues(alpha: 0.9) + : Theme.of(context) + .colorScheme + .primary + .withValues(alpha: 0.9), + ), + padding: WidgetStateProperty.all( + const EdgeInsets.symmetric( + vertical: 17.5, + horizontal: 30, + ), + ), + ), + onPressed: onPressed, + child: Row( + children: [ + Icon( + Icons.electric_bolt, + color: Colors.white, + ), + const SizedBox(width: 8), + Text( + e.name, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + ), ), ), ], ), - ), - ), - SlideTransition( - position: _animations[1], - child: OutlinedButton( - style: ButtonStyle( - side: WidgetStateProperty.all( - BorderSide( - color: Theme.of(context).colorScheme.primary, - ), - ), - foregroundColor: WidgetStateProperty.all( - Theme.of(context).colorScheme.primary, - ), - padding: WidgetStateProperty.all( - const EdgeInsets.symmetric( - vertical: 17.5, - horizontal: 30, - ), - ), - ), - onPressed: onPressed, - child: Row( - children: [ - Icon(Icons.phone_android), - const SizedBox(width: 8), - const Text( - 'Airtime', - style: TextStyle(fontWeight: FontWeight.bold), - ), - ], - ), - ), - ), - SlideTransition( - position: _animations[2], - child: OutlinedButton( - style: ButtonStyle( - side: WidgetStateProperty.all( - BorderSide( - color: Theme.of(context).colorScheme.primary, - ), - ), - padding: WidgetStateProperty.all( - const EdgeInsets.symmetric( - vertical: 17.5, - horizontal: 30, - ), - ), - ), - onPressed: onPressed, - child: Icon(Icons.add), - ), - ), - ], + homeController.model.categories.isNotEmpty + ? const SizedBox(height: 30) + : SizedBox(), + ], + ); + }, ), - const SizedBox(height: 30), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ diff --git a/pubspec.lock b/pubspec.lock index c433588..6300f5e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,22 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: ef06759dc1bc07f900a323b5a4c667aaa23c62704c26d8bdd22a18fd3ec04f6a + url: "https://pub.dev" + source: hosted + version: "84.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: c1e56e205548fa834b96925837dc45d463d433a40597e7004273af5db0d4c52e + url: "https://pub.dev" + source: hosted + version: "7.5.0" args: dependency: transitive description: @@ -25,6 +41,70 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" + build: + dependency: transitive + description: + name: build + sha256: "51dc711996cbf609b90cbe5b335bbce83143875a9d58e4b5c6d3c4f684d3dda7" + url: "https://pub.dev" + source: hosted + version: "2.5.4" + build_config: + dependency: transitive + description: + name: build_config + sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "8e928697a82be082206edb0b9c99c5a4ad6bc31c9e9b8b2f291ae65cd4a25daa" + url: "https://pub.dev" + source: hosted + version: "4.0.4" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: ee4257b3f20c0c90e72ed2b57ad637f694ccba48839a821e87db762548c22a62 + url: "https://pub.dev" + source: hosted + version: "2.5.4" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "382a4d649addbfb7ba71a3631df0ec6a45d5ab9b098638144faf27f02778eb53" + url: "https://pub.dev" + source: hosted + version: "2.5.4" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "85fbbb1036d576d966332a3f5ce83f2ce66a40bea1a94ad2d5fc29a19a0d3792" + url: "https://pub.dev" + source: hosted + version: "9.1.2" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: "082001b5c3dc495d4a42f1d5789990505df20d8547d42507c29050af6933ee27" + url: "https://pub.dev" + source: hosted + version: "8.10.1" characters: dependency: transitive description: @@ -33,6 +113,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" clock: dependency: transitive description: @@ -41,6 +129,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" + url: "https://pub.dev" + source: hosted + version: "4.10.1" collection: dependency: transitive description: @@ -49,6 +145,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.19.1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" crypto: dependency: transitive description: @@ -65,6 +169,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "5b236382b47ee411741447c1f1e111459c941ea1b3f2b540dde54c210a3662af" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + dio: + dependency: "direct main" + description: + name: dio + sha256: "253a18bbd4851fecba42f7343a1df3a9a4c1d31a2c1b37e221086b4fa8c8dbc9" + url: "https://pub.dev" + source: hosted + version: "5.8.0+1" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78" + url: "https://pub.dev" + source: hosted + version: "2.1.1" fake_async: dependency: transitive description: @@ -102,6 +230,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_dotenv: + dependency: "direct main" + description: + name: flutter_dotenv + sha256: b7c7be5cd9f6ef7a78429cabd2774d3c4af50e79cb2b7593e3d5d763ef95c61b + url: "https://pub.dev" + source: hosted + version: "5.2.1" flutter_lints: dependency: "direct dev" description: @@ -128,6 +264,38 @@ packages: description: flutter source: sdk version: "0.0.0" + freezed: + dependency: "direct dev" + description: + name: freezed + sha256: "6022db4c7bfa626841b2a10f34dd1e1b68e8f8f9650db6112dcdeeca45ca793c" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + freezed_annotation: + dependency: "direct main" + description: + name: freezed_annotation + sha256: c87ff004c8aa6af2d531668b46a4ea379f7191dc6dfa066acd53d506da6e044b + url: "https://pub.dev" + source: hosted + version: "3.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" go_router: dependency: "direct main" description: @@ -144,6 +312,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.2.1" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" http: dependency: transitive description: @@ -152,6 +328,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 + url: "https://pub.dev" + source: hosted + version: "3.2.2" http_parser: dependency: transitive description: @@ -168,6 +352,38 @@ packages: url: "https://pub.dev" source: hosted version: "0.19.0" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" + source: hosted + version: "1.0.5" + js: + dependency: transitive + description: + name: js + sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + json_annotation: + dependency: "direct main" + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + json_serializable: + dependency: "direct dev" + description: + name: json_serializable + sha256: c50ef5fc083d5b5e12eef489503ba3bf5ccc899e487d691584699b4bdefeea8c + url: "https://pub.dev" + source: hosted + version: "6.9.5" leak_tracker: dependency: transitive description: @@ -200,6 +416,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.1.1" + logger: + dependency: "direct main" + description: + name: logger + sha256: "2621da01aabaf223f8f961e751f2c943dbb374dc3559b982f200ccedadaa6999" + url: "https://pub.dev" + source: hosted + version: "2.6.0" logging: dependency: transitive description: @@ -232,6 +456,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.16.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" nested: dependency: transitive description: @@ -240,6 +472,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" + source: hosted + version: "2.2.0" path: dependency: transitive description: @@ -328,6 +568,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" provider: dependency: "direct main" description: @@ -336,6 +584,22 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.5" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" + url: "https://pub.dev" + source: hosted + version: "1.5.0" shared_preferences: dependency: "direct main" description: @@ -392,6 +656,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.1" + shelf: + dependency: transitive + description: + name: shelf + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + url: "https://pub.dev" + source: hosted + version: "1.4.2" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" + url: "https://pub.dev" + source: hosted + version: "3.0.0" skeletonizer: dependency: "direct main" description: @@ -405,6 +685,22 @@ packages: description: flutter source: sdk version: "0.0.0" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c" + url: "https://pub.dev" + source: hosted + version: "1.3.5" source_span: dependency: transitive description: @@ -437,6 +733,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 + url: "https://pub.dev" + source: hosted + version: "2.1.1" string_scanner: dependency: transitive description: @@ -461,6 +765,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.4" + timing: + dependency: transitive + description: + name: timing + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" + url: "https://pub.dev" + source: hosted + version: "1.0.2" typed_data: dependency: transitive description: @@ -517,6 +829,14 @@ packages: url: "https://pub.dev" source: hosted version: "14.3.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "0b7fd4a0bbc4b92641dbf20adfd7e3fd1398fe17102d94b674234563e110088a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" web: dependency: transitive description: @@ -525,6 +845,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 + url: "https://pub.dev" + source: hosted + version: "3.0.3" xdg_directories: dependency: transitive description: @@ -541,6 +877,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.5.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" sdks: dart: ">=3.7.2 <4.0.0" flutter: ">=3.27.0" diff --git a/pubspec.yaml b/pubspec.yaml index 8808aea..a979eba 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -42,6 +42,11 @@ dependencies: google_fonts: ^6.1.0 uuid: ^4.3.3 skeletonizer: ^1.4.3 + dio: ^5.8.0+1 + freezed_annotation: ^3.0.0 + json_annotation: ^4.9.0 + flutter_dotenv: ^5.2.1 + logger: ^2.6.0 dev_dependencies: flutter_test: @@ -53,6 +58,9 @@ dev_dependencies: # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^5.0.0 + build_runner: ^2.5.4 + freezed: ^3.0.6 + json_serializable: ^6.9.5 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec @@ -66,9 +74,8 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + assets: + - assets/ # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/to/resolution-aware-images