diff --git a/lib/data/getFile.dart b/lib/data/getFile.dart new file mode 100644 index 0000000..671241b --- /dev/null +++ b/lib/data/getFile.dart @@ -0,0 +1,11 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/material.dart'; + +void downloadFile(String url, String savePath) async { + Dio dio = Dio(); + try { + Response response = await dio.download(url, savePath); + } catch (error) { + debugPrint(error as String?); + } +} diff --git a/lib/data/interactor/ticket_list_interactor.dart b/lib/data/interactor/ticket_list_interactor.dart new file mode 100644 index 0000000..cc12170 --- /dev/null +++ b/lib/data/interactor/ticket_list_interactor.dart @@ -0,0 +1,66 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:surf_flutter_study_jam_2023/data/ticket.dart'; + +class TicketListInteractor extends ChangeNotifier { + String dirLink = ''; + String dirLoad = ''; + String dirLoaded = ''; + + Future createDir() async { + Directory appDocDir = await getApplicationDocumentsDirectory(); + + await Directory('${appDocDir.path}/link') + .create(recursive: true) + .then((value) => dirLink = value.path); + await Directory('${appDocDir.path}/load') + .create(recursive: true) + .then((value) => dirLoad = value.path); + await Directory('${appDocDir.path}/loaded') + .create(recursive: true) + .then((value) => dirLoaded = value.path); + } + + Future> loadListTicket() async { + List ret = []; + + //var getFiles(); + + for (int i = 0; i < 20; i++) { + ret.add(Ticket(TypeTicketEnum.show, i.toString(), StatusEnum.linkSaved)); + } + + return ret; + } +} + + + +List getFiles(Directory directory) { + List files = []; + + directory.listSync(recursive: true).forEach((FileSystemEntity entity) { + if (entity is File) { + files.add(FileInfo(entity.path.split('/').last, entity.lastAccessedSync(), + entity.parent.path)); + } + }); + + return files; +} + +class FileInfo { + final String name; + final DateTime createdAt; + final String parentDirectory; + + FileInfo(this.name, this.createdAt, this.parentDirectory); + + @override + String toString() { + return '$name: $createdAt $parentDirectory'; + } +} diff --git a/lib/data/ticket.dart b/lib/data/ticket.dart new file mode 100644 index 0000000..6cc8174 --- /dev/null +++ b/lib/data/ticket.dart @@ -0,0 +1,39 @@ +class Ticket { + + + + late TypeTicketEnum typeTicketEnum; + String downloadLink = ''; + late StatusEnum statusTicket; + + /// Получить имя файла из ссылки. + String getNameTicketFromLink(String fullPath) => fullPath.split('/').last; + + Ticket(this.typeTicketEnum, this.downloadLink, this.statusTicket); +} + +///Статус ссылки. +enum StatusEnum { + ///Есть путь к файлу билета + linkSaved, + + ///Скачиваем по ссылке + downloadFromLink, + + ///Файл скачен по ссылке + downloadedFromLink, +} + +enum TypeTicketEnum { + ///Билеты на самолет + air, + + ///Билеты на поезд + train, + + ///Билеты на развлекательные мероприятия + show, + + ///Билеты котрый нельзя отнести к предыдущим категорям + other +} diff --git a/lib/features/res/color_palette.dart b/lib/features/res/color_palette.dart new file mode 100644 index 0000000..31c6d27 --- /dev/null +++ b/lib/features/res/color_palette.dart @@ -0,0 +1,5 @@ +import 'package:flutter/material.dart'; + +class ColorPalette { + static const Color greenColor = Color(0xFF4CAF50); +} diff --git a/lib/features/res/multi_bloc_providers.dart b/lib/features/res/multi_bloc_providers.dart new file mode 100644 index 0000000..2af4478 --- /dev/null +++ b/lib/features/res/multi_bloc_providers.dart @@ -0,0 +1,15 @@ +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:surf_flutter_study_jam_2023/data/interactor/ticket_list_interactor.dart'; +import 'package:surf_flutter_study_jam_2023/features/ticket_storage/bloc/ticket_storage_bloc.dart'; +import 'package:surf_flutter_study_jam_2023/features/ticket_storage/widget/ticket/bloc/ticket_item_bloc.dart'; + +/// Список подключенных провадеров +List listMultiBlocProviders = [ + BlocProvider( + create: (context) => TicketStorageBloc(context.read()) + ..add(TicketListLoadEvent()), + ), + BlocProvider( + create: (context) => TicketItemBloc(context.read()), + ), +]; diff --git a/lib/features/res/multi_providers.dart b/lib/features/res/multi_providers.dart new file mode 100644 index 0000000..5d44e98 --- /dev/null +++ b/lib/features/res/multi_providers.dart @@ -0,0 +1,13 @@ +import 'package:flutter/material.dart'; + +import 'package:provider/provider.dart'; +import 'package:surf_flutter_study_jam_2023/data/interactor/ticket_list_interactor.dart'; + +/// Список подключенных провадеров +List> listMultiProviders = + >[ + ChangeNotifierProvider(create: (context) { + return TicketListInteractor()..createDir(); + }, + ) +]; diff --git a/lib/features/res/svg_icons.dart b/lib/features/res/svg_icons.dart new file mode 100644 index 0000000..b08d5d5 --- /dev/null +++ b/lib/features/res/svg_icons.dart @@ -0,0 +1,11 @@ +class SvgIcons { + static const String catalog = 'res/icon/'; + static const String air = '${catalog}air.svg'; + static const String checkbox = '${catalog}checkbox.svg'; + static const String checkboxSign = '${catalog}checkbox_sign.svg'; + static const String cloud = '${catalog}cloud.svg'; + static const String cloudCheck = '${catalog}cloud_check.svg'; + static const String other = '${catalog}other.svg'; + static const String show = '${catalog}show.svg'; + static const String train = '${catalog}train.svg'; +} diff --git a/lib/features/ticket_storage/bloc/ticket_storage_bloc.dart b/lib/features/ticket_storage/bloc/ticket_storage_bloc.dart new file mode 100644 index 0000000..5903a60 --- /dev/null +++ b/lib/features/ticket_storage/bloc/ticket_storage_bloc.dart @@ -0,0 +1,75 @@ +import 'package:equatable/equatable.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:surf_flutter_study_jam_2023/data/interactor/ticket_list_interactor.dart'; +import 'package:surf_flutter_study_jam_2023/data/ticket.dart'; + + +part 'ticket_storage_event.dart'; + +part 'ticket_storage_state.dart'; + +class TicketStorageBloc extends Bloc { + final TicketListInteractor ticketListInteractor; + + //ticket_storage_interactor + + TicketStorageBloc(this.ticketListInteractor) + : super(TicketListLoadState()) { + ///Обработка события загрузка экрана + on(_onTicketListLoad); + + ///Обработка события окончание загрузки экрана + on(_onTicketListShow); + + ///Обработка события удаление меств из списка "Посещенные" + on(_onTicketSelect); + + ///Нажали на карточку места + on(_onTicketRemove); + } + + Future _onTicketListLoad( + TicketStorageEvent event, + Emitter emit, + ) async { + debugPrint('Начало загрузки'); + emit(TicketListLoadState()); + + final future = await ticketListInteractor.loadListTicket(); + + emit(TicketShowListState(future)); + + debugPrint(' после загрузки'); + } + + Future _onTicketListShow( + TicketStorageEvent event, + Emitter emit, + ) async { + debugPrint(' до загрузки'); + emit(TicketListLoadState()); + debugPrint(' после загрузки'); + final future = ticketListInteractor.loadListTicket(); + } + + Future _onTicketSelect( + TicketStorageEvent event, + Emitter emit, + ) async { + debugPrint(' до загрузки'); + emit(TicketListLoadState()); + debugPrint(' после загрузки'); + final future = ticketListInteractor.loadListTicket(); + } + + Future _onTicketRemove( + TicketStorageEvent event, + Emitter emit, + ) async { + debugPrint(' до загрузки'); + emit(TicketListLoadState()); + debugPrint(' после загрузки'); + final future = ticketListInteractor.loadListTicket(); + } +} diff --git a/lib/features/ticket_storage/bloc/ticket_storage_event.dart b/lib/features/ticket_storage/bloc/ticket_storage_event.dart new file mode 100644 index 0000000..31b9c4e --- /dev/null +++ b/lib/features/ticket_storage/bloc/ticket_storage_event.dart @@ -0,0 +1,37 @@ +part of 'ticket_storage_bloc.dart'; + +abstract class TicketStorageEvent extends Equatable { + const TicketStorageEvent(); +} + +class TicketListLoadEvent extends TicketStorageEvent { + @override + List get props => []; +} + +class TicketListShowEvent extends TicketStorageEvent { + final List listTicket; + + @override + List get props => []; + + const TicketListShowEvent(this.listTicket); +} + +class TicketSelectEvent extends TicketStorageEvent { + final Ticket ticket; + + @override + List get props => []; + + const TicketSelectEvent(this.ticket); +} + +class TicketRemoveEvent extends TicketStorageEvent { + final Ticket ticket; + + @override + List get props => []; + + const TicketRemoveEvent(this.ticket); +} \ No newline at end of file diff --git a/lib/features/ticket_storage/bloc/ticket_storage_state.dart b/lib/features/ticket_storage/bloc/ticket_storage_state.dart new file mode 100644 index 0000000..fef27e1 --- /dev/null +++ b/lib/features/ticket_storage/bloc/ticket_storage_state.dart @@ -0,0 +1,38 @@ +part of 'ticket_storage_bloc.dart'; + +abstract class TicketStorageState extends Equatable { + const TicketStorageState(); +} + +class TicketListLoadState extends TicketStorageState { + @override + List get props => []; +} + +class TicketShowListState extends TicketStorageState { + final List listTicket; + + @override + List get props => [listTicket]; + + const TicketShowListState(this.listTicket); + + @override + String toString() { + return 'Показать список билетов. Количество билетов = ${listTicket.length}'; + } +} + +class TicketSelectedState extends TicketStorageState { + final Ticket ticket; + + @override + List get props => [ticket]; + + const TicketSelectedState(this.ticket); + + @override + String toString() { + return 'Выбран билет. Полный путь к билету = ${ticket.downloadLink}'; + } +} \ No newline at end of file diff --git a/lib/features/ticket_storage/ticket_storage_page.dart b/lib/features/ticket_storage/ticket_storage_page.dart index 1ab6dd5..4bee6e8 100644 --- a/lib/features/ticket_storage/ticket_storage_page.dart +++ b/lib/features/ticket_storage/ticket_storage_page.dart @@ -1,11 +1,19 @@ import 'package:flutter/material.dart'; +import 'package:surf_flutter_study_jam_2023/features/ticket_storage/widget/app_bar_title.dart'; +import 'package:surf_flutter_study_jam_2023/features/ticket_storage/widget/body.dart'; /// Экран “Хранения билетов”. class TicketStoragePage extends StatelessWidget { const TicketStoragePage({Key? key}) : super(key: key); @override - Widget build(BuildContext context) { - return const FlutterLogo(); - } + Widget build(BuildContext context) => Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + centerTitle: false, + title: const AppBarTitle(), + ), + //bottomSheet: const ButtonShow(), + body: const Body(), + ); } diff --git a/lib/features/ticket_storage/widget/app_bar_title.dart b/lib/features/ticket_storage/widget/app_bar_title.dart new file mode 100644 index 0000000..a0bb867 --- /dev/null +++ b/lib/features/ticket_storage/widget/app_bar_title.dart @@ -0,0 +1,13 @@ +import 'package:flutter/material.dart'; + +///AppBarTitle +class AppBarTitle extends StatelessWidget { + /// + const AppBarTitle({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) => Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: const [Text('Хранение билетов')], + ); +} diff --git a/lib/features/ticket_storage/widget/body.dart b/lib/features/ticket_storage/widget/body.dart new file mode 100644 index 0000000..1c8e97c --- /dev/null +++ b/lib/features/ticket_storage/widget/body.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:surf_flutter_study_jam_2023/features/ticket_storage/bloc/ticket_storage_bloc.dart'; +import 'package:surf_flutter_study_jam_2023/features/ticket_storage/widget/list_empty.dart'; +import 'package:surf_flutter_study_jam_2023/features/ticket_storage/widget/list_full.dart'; + +class Body extends StatelessWidget { + const Body({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MultiBlocListener( + listeners: [ + BlocListener( + listenWhen: (previousState, state) { + return true; + }, + listener: (context, state) {}, + ), + ], + child: BlocBuilder( + builder: (context, state) { + return state.props.isEmpty ? const ListEmpty() : const ListFull(); + }, + ), + ); + } +} diff --git a/lib/features/ticket_storage/widget/list_empty.dart b/lib/features/ticket_storage/widget/list_empty.dart new file mode 100644 index 0000000..2f92539 --- /dev/null +++ b/lib/features/ticket_storage/widget/list_empty.dart @@ -0,0 +1,12 @@ +import 'package:flutter/cupertino.dart'; + +class ListEmpty extends StatelessWidget { + const ListEmpty({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return const Center( + child: Text('Здесь пока ничего нет'), + ); + } +} diff --git a/lib/features/ticket_storage/widget/list_full.dart b/lib/features/ticket_storage/widget/list_full.dart new file mode 100644 index 0000000..5720cad --- /dev/null +++ b/lib/features/ticket_storage/widget/list_full.dart @@ -0,0 +1,25 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:surf_flutter_study_jam_2023/data/ticket.dart'; +import 'package:surf_flutter_study_jam_2023/features/ticket_storage/bloc/ticket_storage_bloc.dart'; +import 'package:surf_flutter_study_jam_2023/features/ticket_storage/widget/ticket/ticketItem.dart'; + +class ListFull extends StatelessWidget { + + const ListFull({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return BlocBuilder( + builder: (context, state) { + return ListView.builder( + itemCount: (state.props.first as List).length, + itemBuilder: (context, position) { + + return TicketItem((state.props.first as List)[position]); + }, + ); + }, + ); + } +} diff --git a/lib/features/ticket_storage/widget/ticket/bloc/ticket_item_bloc.dart b/lib/features/ticket_storage/widget/ticket/bloc/ticket_item_bloc.dart new file mode 100644 index 0000000..d0359c4 --- /dev/null +++ b/lib/features/ticket_storage/widget/ticket/bloc/ticket_item_bloc.dart @@ -0,0 +1,52 @@ +import 'package:equatable/equatable.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:surf_flutter_study_jam_2023/data/interactor/ticket_list_interactor.dart'; +import 'package:surf_flutter_study_jam_2023/data/ticket.dart'; + + + +part 'ticket_item_event.dart'; + +part 'ticket_item_state.dart'; + +class TicketItemBloc extends Bloc { + final TicketListInteractor ticketListInteractor; + + //ticket_storage_interactor + + TicketItemBloc(this.ticketListInteractor) + : super(TicketItemShowState()) { + ///Обработка события загрузка экрана + on(_onTicketItemLoad); + + ///Обработка события окончание загрузки экрана + on(_onTicketItemShow); + + } + + Future _onTicketItemLoad( + TicketItemEvent event, + Emitter emit, + ) async { + + debugPrint('Начало загрузки ${event.props.first.toString()}'); + emit(TicketItemLoadState(event.props.first as int)); + + if ((event.props.first as int) == 100) { + emit(TicketItemShowState()); + } + + debugPrint(' после загрузки'); + } + + Future _onTicketItemShow( + TicketItemEvent event, + Emitter emit, + ) async { + + + + } + +} diff --git a/lib/features/ticket_storage/widget/ticket/bloc/ticket_item_event.dart b/lib/features/ticket_storage/widget/ticket/bloc/ticket_item_event.dart new file mode 100644 index 0000000..cd4ce65 --- /dev/null +++ b/lib/features/ticket_storage/widget/ticket/bloc/ticket_item_event.dart @@ -0,0 +1,41 @@ +part of 'ticket_item_bloc.dart'; + +abstract class TicketItemEvent extends Equatable { + const TicketItemEvent(); +} + +class TicketItemLoadEvent extends TicketItemEvent { + final int process; + + @override + List get props => [process]; + + const TicketItemLoadEvent(this.process); +} + +class TicketItemShowEvent extends TicketItemEvent { + final int process; + + @override + List get props => [process]; + + const TicketItemShowEvent(this.process); +} + +class TicketItemSelectEvent extends TicketItemEvent { + final Ticket ticket; + + @override + List get props => []; + + const TicketItemSelectEvent(this.ticket); +} + +class TicketItemRemoveEvent extends TicketItemEvent { + final Ticket ticket; + + @override + List get props => []; + + const TicketItemRemoveEvent(this.ticket); +} diff --git a/lib/features/ticket_storage/widget/ticket/bloc/ticket_item_state.dart b/lib/features/ticket_storage/widget/ticket/bloc/ticket_item_state.dart new file mode 100644 index 0000000..f6a7eed --- /dev/null +++ b/lib/features/ticket_storage/widget/ticket/bloc/ticket_item_state.dart @@ -0,0 +1,37 @@ +part of 'ticket_item_bloc.dart'; + +abstract class TicketItemState extends Equatable { + const TicketItemState(); +} + +class TicketItemLoadState extends TicketItemState { + final int process; + @override + List get props => [process]; + + const TicketItemLoadState(this.process); +} + +class TicketItemShowState extends TicketItemState { + + @override + List get props => []; + + const TicketItemShowState(); + + +} + +class TicketSelectedState extends TicketItemState { + final Ticket ticket; + + @override + List get props => [ticket]; + + const TicketSelectedState(this.ticket); + + @override + String toString() { + return 'Выбран билет. Полный путь к билету = ${ticket.downloadLink}'; + } +} diff --git a/lib/features/ticket_storage/widget/ticket/indicator.dart b/lib/features/ticket_storage/widget/ticket/indicator.dart new file mode 100644 index 0000000..59c3eed --- /dev/null +++ b/lib/features/ticket_storage/widget/ticket/indicator.dart @@ -0,0 +1,30 @@ +import 'package:flutter/material.dart'; + +class Indicator extends StatefulWidget { + String downloadLink; + + Indicator(this.downloadLink, {Key? key}) : super(key: key); + + @override + State createState() => _IndicatorState(); +} + +class _IndicatorState extends State { + double _progress = 0; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Center( + child: LinearProgressIndicator( + value: _progress, + backgroundColor: Colors.grey[200], + valueColor: const AlwaysStoppedAnimation(Colors.blue), + ), + ); + } +} diff --git a/lib/features/ticket_storage/widget/ticket/ticketItem.dart b/lib/features/ticket_storage/widget/ticket/ticketItem.dart new file mode 100644 index 0000000..da08329 --- /dev/null +++ b/lib/features/ticket_storage/widget/ticket/ticketItem.dart @@ -0,0 +1,88 @@ + + +import 'package:dio/dio.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; +import 'package:surf_flutter_study_jam_2023/data/interactor/ticket_list_interactor.dart'; +import 'package:surf_flutter_study_jam_2023/data/ticket.dart'; +import 'package:surf_flutter_study_jam_2023/features/res/color_palette.dart'; +import 'package:surf_flutter_study_jam_2023/features/res/svg_icons.dart'; +import 'package:surf_flutter_study_jam_2023/features/ticket_storage/widget/ticket/bloc/ticket_item_bloc.dart'; +import 'package:surf_flutter_study_jam_2023/features/ticket_storage/widget/ticket/indicator.dart'; + +class TicketItem extends StatelessWidget { + Ticket ticket; + + TicketItem(this.ticket, {Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return BlocBuilder( + builder: (context, state) { + return Row( + children: [ + SvgPicture.asset( + SvgIcons.show, + height: 30, + color: ColorPalette.greenColor, + ), + Column( + children: [ + Text('Билет'), + Container(width: 100, child: Indicator(ticket.downloadLink)), + state.props.length>0 && state.props.first is int? + + Text('${state.props.first}'): + Text('Не загружен') + , + ], + ), + IconButton( + onPressed: () { + _onPressed(context, ticket.downloadLink); + }, + icon: const Icon(Icons.cloud_download,), + ) + ], + ); + } + ); + } +} + +_onPressed(BuildContext context, String downloadLink) async { + Dio dio = Dio(); + + + String url = 'https://journal-free.ru/download/dachnye-sekrety-11-noiabr-2019.pdf'; + + String dirLink = context + .read() + .dirLink; + + String savePath = '$dirLink/${url + .split('/') + .last} '; + + debugPrint(' savePath = ${savePath}'); + + try { + await dio.download( + url, + savePath, + onReceiveProgress: (received, total) { + + debugPrint(' $received, $total'); + + int process = ((received / total)*10000) ~/ 100; + + context.read().add( + TicketItemLoadEvent(process)); + }); + } catch (e) { + debugPrint('Ошибка загрузки! ${e.toString()}'); + } +} + diff --git a/lib/main.dart b/lib/main.dart index c1be491..5891054 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,8 +1,30 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; + +import 'package:provider/provider.dart'; +import 'package:surf_flutter_study_jam_2023/features/res/multi_bloc_providers.dart'; +import 'package:surf_flutter_study_jam_2023/features/res/multi_providers.dart'; import 'package:surf_flutter_study_jam_2023/features/ticket_storage/ticket_storage_page.dart'; void main() { - runApp(const MyApp()); + WidgetsFlutterBinding.ensureInitialized(); + + SystemChrome.setSystemUIOverlayStyle( + const SystemUiOverlayStyle( + statusBarColor: Colors.transparent, // transparent status bar + ), + ); + + runApp( + MultiProvider( + providers: listMultiProviders, + child: MultiBlocProvider( + providers: listMultiBlocProviders, + child: const MyApp(), + ), + ), + ); } class MyApp extends StatelessWidget { diff --git a/pubspec.lock b/pubspec.lock index b2cb69d..f8b33ff 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -9,6 +9,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.10.0" + bloc: + dependency: "direct main" + description: + name: bloc + sha256: "658a5ae59edcf1e58aac98b000a71c762ad8f46f1394c34a52050cafb3e11a80" + url: "https://pub.dev" + source: hosted + version: "8.1.1" + bloc_concurrency: + dependency: "direct main" + description: + name: bloc_concurrency + sha256: "9a94e05be7754ec9cfc6e7a68b340be63381a54cadabee25ec3296838646ad3e" + url: "https://pub.dev" + source: hosted + version: "0.2.1" boolean_selector: dependency: transitive description: @@ -49,6 +65,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" + dio: + dependency: "direct main" + description: + name: dio + sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8" + url: "https://pub.dev" + source: hosted + version: "4.0.6" + equatable: + dependency: "direct main" + description: + name: equatable + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + url: "https://pub.dev" + source: hosted + version: "2.0.5" fake_async: dependency: transitive description: @@ -57,11 +89,35 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + file: + dependency: transitive + description: + name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" + source: hosted + version: "6.1.4" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: "434951eea948dbe87f737b674281465f610b8259c16c097b8163ce138749a775" + url: "https://pub.dev" + source: hosted + version: "8.1.2" flutter_lints: dependency: "direct dev" description: @@ -70,11 +126,35 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.1" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: "9ac1967e2f72a08af11b05b39167920f90d043cf67163d13a544a358c8f31afa" + url: "https://pub.dev" + source: hosted + version: "0.22.0" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + intl: + dependency: "direct main" + description: + name: intl + sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + url: "https://pub.dev" + source: hosted + version: "0.17.0" js: dependency: transitive description: @@ -83,6 +163,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.5" + json_annotation: + dependency: "direct main" + description: + name: json_annotation + sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + url: "https://pub.dev" + source: hosted + version: "4.8.0" lints: dependency: transitive description: @@ -115,14 +203,126 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.0" - path: + nested: dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + path: + dependency: "direct main" description: name: path sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b url: "https://pub.dev" source: hosted version: "1.8.2" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: "3bdd251dae9ffaef944450b73f168610db7e968e7b20daf0c3907f8b4aafc8a2" + url: "https://pub.dev" + source: hosted + version: "0.5.1+1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: ee5c47c1058ad66b4a41746ec3996af9593d0858872807bcd64ac118f0700337 + url: "https://pub.dev" + source: hosted + version: "0.2.1" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: c7edf82217d4b2952b2129a61d3ad60f1075b9299e629e149a8d2e39c2e6aad4 + url: "https://pub.dev" + source: hosted + version: "2.0.14" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "019f18c9c10ae370b08dce1f3e3b73bc9f58e7f087bb5e921f06529438ac0ae7" + url: "https://pub.dev" + source: hosted + version: "2.0.24" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "818b2dc38b0f178e0ea3f7cf3b28146faab11375985d815942a68eee11c2d0f7" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1" + url: "https://pub.dev" + source: hosted + version: "2.1.10" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + url: "https://pub.dev" + source: hosted + version: "2.0.6" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: f53720498d5a543f9607db4b0e997c4b5438884de25b0f73098cc2671a51b130 + url: "https://pub.dev" + source: hosted + version: "2.1.5" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + url: "https://pub.dev" + source: hosted + version: "5.1.0" + platform: + dependency: transitive + description: + name: platform + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + process: + dependency: transitive + description: + name: process + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + provider: + dependency: "direct main" + description: + name: provider + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" + source: hosted + version: "6.0.5" sky_engine: dependency: transitive description: flutter @@ -152,6 +352,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" string_scanner: dependency: transitive description: @@ -176,6 +384,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.16" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + url: "https://pub.dev" + source: hosted + version: "1.3.1" vector_math: dependency: transitive description: @@ -184,5 +400,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + win32: + dependency: transitive + description: + name: win32 + sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4 + url: "https://pub.dev" + source: hosted + version: "3.1.4" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + xml: + dependency: transitive + description: + name: xml + sha256: "80d494c09849dc3f899d227a78c30c5b949b985ededf884cb3f3bcd39f4b447a" + url: "https://pub.dev" + source: hosted + version: "5.4.1" sdks: dart: ">=2.19.6 <3.0.0" + flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 5abeaf8..0af7c58 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,9 +28,22 @@ environment: # the latest version available on pub.dev. To see which dependencies have newer # versions available, run `flutter pub outdated`. dependencies: + bloc: ^8.1.0 + bloc_concurrency: ^0.2.0 + dio: ^4.0.6 + equatable: ^2.0.3 + flutter: sdk: flutter + flutter_bloc: ^8.0.1 + flutter_svg: ^0.22.0 + + intl: ^0.17.0 + json_annotation: ^4.6.0 + path_provider: any + provider: ^6.0.0 + path: 1.8.2 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. @@ -50,6 +63,7 @@ dev_dependencies: # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec + # The following section is specific to Flutter packages. flutter: @@ -58,33 +72,7 @@ flutter: # the material Icons class. 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 - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages + assets: + - res/ + - res/icon/ - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages