From bfc24e36348ad23523b8a98b0c70247c2b2c4d71 Mon Sep 17 00:00:00 2001 From: goldfest228 Date: Wed, 11 Dec 2024 13:51:53 +0400 Subject: [PATCH] lab5 --- lib/domain/models/card.dart | 12 +- .../details_page/details_page.dart | 14 +- lib/presentation/home_page/card.dart | 11 +- lib/presentation/home_page/home_page.dart | 198 +++++---- pubspec.lock | 400 +++++++++++++++++- pubspec.yaml | 21 +- 6 files changed, 537 insertions(+), 119 deletions(-) diff --git a/lib/domain/models/card.dart b/lib/domain/models/card.dart index 61afed6..9db6276 100644 --- a/lib/domain/models/card.dart +++ b/lib/domain/models/card.dart @@ -1,17 +1,19 @@ import 'package:flutter/material.dart'; class CardData { - final String text; - final String descriptionText; - final IconData icon; + final String? text; + final String? descriptionText; + //final IconData icon; final String? imageUrl; - final String gameDesc; + final int? gameDesc; + final int? gameDesc2; CardData( this.text, { required this.descriptionText, - this.icon = Icons.ac_unit_outlined, + //this.icon = Icons.ac_unit_outlined, this.imageUrl, required this.gameDesc, + required this.gameDesc2, }); } \ No newline at end of file diff --git a/lib/presentation/details_page/details_page.dart b/lib/presentation/details_page/details_page.dart index f39b28a..0c9776f 100644 --- a/lib/presentation/details_page/details_page.dart +++ b/lib/presentation/details_page/details_page.dart @@ -9,12 +9,11 @@ class DetailsPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(backgroundColor: Colors.grey, - ), + appBar: AppBar(backgroundColor: Colors.grey), body: SingleChildScrollView( child: Container( - constraints: BoxConstraints( minHeight: MediaQuery.sizeOf(context).height - 105), - decoration: const BoxDecoration(color: Colors.white38,), + constraints: BoxConstraints(minHeight: MediaQuery.sizeOf(context).height - 105), + decoration: const BoxDecoration(color: Colors.white38), padding: const EdgeInsets.all(10), child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -26,18 +25,19 @@ class DetailsPage extends StatelessWidget { Padding( padding: const EdgeInsets.only(bottom: 4.0), child: Text( - data.text, + data.text!, style: Theme.of(context).textTheme.headlineLarge, ), ), Text( - data.gameDesc, + 'Кол-во патрон: ${data.gameDesc.toString()}, Стоимость: ${data.gameDesc2.toString()}', style: Theme.of(context).textTheme.bodyLarge, ) + ], ), ), ), ); } -} \ No newline at end of file +} diff --git a/lib/presentation/home_page/card.dart b/lib/presentation/home_page/card.dart index 6c89133..778f84b 100644 --- a/lib/presentation/home_page/card.dart +++ b/lib/presentation/home_page/card.dart @@ -5,14 +5,14 @@ typedef OnLikeCallback = void Function(String title, bool isLiked); class _Card extends StatefulWidget { final String text; final String descriptionText; - final IconData icon; + //final IconData icon; final String? imageUrl; final OnLikeCallback? onLike; final VoidCallback? onTap; const _Card( this.text, { - this.icon = Icons.abc, + //this.icon = Icons.abc, required this.descriptionText, this.imageUrl, this.onLike, @@ -25,9 +25,9 @@ class _Card extends StatefulWidget { VoidCallback? onTap, }) => _Card( - data.text, - descriptionText: data.descriptionText, - icon: data.icon, + data.text!, + descriptionText: data.descriptionText!, + //icon: data.icon, imageUrl: data.imageUrl, onLike: onLike, onTap: onTap, @@ -115,7 +115,6 @@ class _CardState extends State<_Card> { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Icon(widget.icon), GestureDetector( onTap: () { setState(() { diff --git a/lib/presentation/home_page/home_page.dart b/lib/presentation/home_page/home_page.dart index 7e1a55f..3cca0a3 100644 --- a/lib/presentation/home_page/home_page.dart +++ b/lib/presentation/home_page/home_page.dart @@ -1,7 +1,9 @@ +import 'package:flutter_test_app/data/repositories/mock_repository.dart'; import 'package:flutter_test_app/main.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import '../../data/repositories/weapons_repository.dart'; import '../../domain/models/card.dart'; import '../details_page/details_page.dart'; @@ -32,102 +34,118 @@ class _MyHomePageState extends State { } } -class Body extends StatelessWidget { +class Body extends StatefulWidget { const Body({super.key}); // ключи + @override + State createState() => _BodyState(); +} + +class _BodyState extends State { + final searchController = TextEditingController(); + final ScrollController _scrollController = ScrollController(); + late Future?> data; + final repo = WeaponsRepository(); + + @override + void initState() { + data = repo.loadData(); + super.initState(); + } + + @override + void dispose() { + searchController.dispose(); + _scrollController.dispose(); + super.dispose(); + } + + // Метод для прокрутки к определённой карточке + void _scrollToCard(String searchQuery, List? dataList) { + if (dataList == null || dataList.isEmpty) return; + + final index = dataList.indexWhere((data) => + data.text?.toLowerCase() == searchQuery.toLowerCase()); + + if (index != -1) { + _scrollController.animateTo( + index * 180.0, // Высота элемента списка с учётом padding и margin + duration: const Duration(seconds: 1), + curve: Curves.easeInOut, + ); + } + } + @override Widget build(BuildContext context) { - final data = [ - CardData( - 'Мама с сыном', - descriptionText: '-Чё вылупился?', - imageUrl: - 'https://pic.rutubelist.ru/video/8b/31/8b31b4f162bf11007c036be6787e9bb1.jpg', - gameDesc: 'Описание жесткое' - ), - CardData( - 'Ярускин Салих', - descriptionText: 'я мусор', - imageUrl: - 'https://steamuserimages-a.akamaihd.net/ugc/2030615098399987630/EB9690C3D097504388EA8F057E48631354C05182/?imw=512&&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false', - gameDesc: 'Описание жесткое' - ), - CardData( - 'Гламурная бабизяна', - descriptionText: 'сделала губки 5мл', - imageUrl: - 'https://avatars.dzeninfra.ru/get-zen_doc/3310860/pub_602156c24849a6360821ff59_60215909390eb32b9bb9e012/scale_1200', - gameDesc: 'Описание жесткое' - ), - CardData( - 'Мелкий', - descriptionText: 'невдупленыш', - imageUrl: - 'https://sun9-59.userapi.com/impg/DBnGgdqZnRtBw9jchGixY6rRN-zTWaAEVjLxXw/HrYCralVB-4.jpg?size=807x577&quality=96&sign=a84b4d87249b7d5ade53369663a3a9e0&c_uniq_tag=2XoQqW9aaCVDnvITURMqqPPY9yznsdCr4HWXaSv9Q_U&type=album', - gameDesc: 'Описание жесткое' - ), - CardData( - 'Обезьянка Олежа', - descriptionText: 'Поняла смысл жизни...', - imageUrl: - 'https://avatars.yandex.net/get-music-content/5417945/f468314f.a.20066160-1/m1000x1000?webp=false', - gameDesc: 'Описание жесткое' - ), - CardData( - 'Афанасьев Степан', - descriptionText: 'основатель ЧВК Мартышки', - imageUrl: - 'https://steamuserimages-a.akamaihd.net/ugc/1621850006938404146/EA72DC3C31DED440C024F0DD1D9859C44B1BBDFF/?imw=512&&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false', - gameDesc: 'Описание жесткое' - ), - CardData( - 'Лобашов Иван', - descriptionText: 'вычисляет противников', - imageUrl: - 'https://cdn1.ozone.ru/s3/multimedia-i/6449406306.jpg', - gameDesc: 'Описание жесткое' - ), - CardData( - 'Коренной представитель ЧВК Мартышки', - descriptionText: 'сейчас он где-то в Камеруне проветривает свои блохи', - imageUrl: - 'https://otvet.imgsmail.ru/download/306401642_9fecf789a8802c5805c4e21291cba6a6_800.jpg', - gameDesc: 'Описание жесткое' - ), - ]; - return Center( - child: SingleChildScrollView( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, //расположение по главной оси - children: data.map((data) { - return _Card.fromData( - data, - onLike: (String title, bool isLiked) => - _showSnackBar(context, title, isLiked), - onTap: () => _navToDetails(context, data), - ); - }).toList(), - ), + return Padding( + padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top), + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(12), + child: CupertinoSearchTextField( + controller: searchController, + onSubmitted: (search) { + data.then((dataList) { + _scrollToCard(search, dataList); + }); + }, + ), + ), + Expanded( + child: Center( + child: FutureBuilder?>( + future: data, + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const CircularProgressIndicator(); + } else if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else if (snapshot.hasData && snapshot.data != null) { + return ListView.builder( + controller: _scrollController, + itemCount: snapshot.data!.length, + itemBuilder: (context, index) { + final cardData = snapshot.data![index]; + return _Card.fromData( + cardData, + onLike: (String title, bool isLiked) => + _showSnackBar(context, title, isLiked), + onTap: () => _navToDetails(context, cardData), + ); + }, + ); + } else { + return const Text('No data available'); + } + }, + ), + ), + ), + ], ), ); } -} -void _navToDetails(BuildContext context, CardData data) { - Navigator.push( - context, - CupertinoPageRoute(builder: (context) => DetailsPage(data)), - ); -} -void _showSnackBar(BuildContext context, String title, bool isLiked) { //выводить уведомление о поставке лайке с названием карточки - WidgetsBinding.instance.addPostFrameCallback((_) { - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - 'New $title ${isLiked ? 'liked' : 'disliked '}', - style: Theme.of(context).textTheme.bodyLarge, - ), - backgroundColor: Colors.deepPurpleAccent, - duration: const Duration(seconds: 1), - )); - }); + + void _navToDetails(BuildContext context, CardData data) { + Navigator.push( + context, + CupertinoPageRoute(builder: (context) => DetailsPage(data)), + ); + } + + void _showSnackBar(BuildContext context, String title, bool isLiked) { + WidgetsBinding.instance.addPostFrameCallback((_) { + ScaffoldMessenger.of(context).showSnackBar(SnackBar( + content: Text( + 'News $title ${isLiked ? 'liked' : 'disliked '}', + style: Theme.of(context).textTheme.bodyLarge, + ), + backgroundColor: Colors.deepPurpleAccent, + duration: const Duration(seconds: 1), + )); + }); + } } diff --git a/pubspec.lock b/pubspec.lock index 9931d58..4ddc5cf 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,30 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + url: "https://pub.dev" + source: hosted + version: "64.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + url: "https://pub.dev" + source: hosted + version: "6.2.0" + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" async: dependency: transitive description: @@ -9,6 +33,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.11.0" + bloc: + dependency: "direct main" + description: + name: bloc + sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" + url: "https://pub.dev" + source: hosted + version: "8.1.4" boolean_selector: dependency: transitive description: @@ -17,6 +49,70 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + url: "https://pub.dev" + source: hosted + version: "4.0.1" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + url: "https://pub.dev" + source: hosted + version: "2.4.9" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + 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: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" characters: dependency: transitive description: @@ -25,6 +121,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.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: @@ -33,6 +137,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" collection: dependency: transitive description: @@ -41,6 +153,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.17.2" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" cupertino_icons: dependency: "direct main" description: @@ -49,6 +185,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" + dio: + dependency: "direct main" + description: + name: dio + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac" + url: "https://pub.dev" + source: hosted + version: "1.0.1" fake_async: dependency: transitive description: @@ -57,6 +217,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -66,23 +242,111 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.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: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + html: + dependency: "direct main" + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" + 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: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b + url: "https://pub.dev" + source: hosted + version: "6.8.0" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" matcher: dependency: transitive description: @@ -107,6 +371,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" path: dependency: transitive description: @@ -115,11 +395,75 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + pretty_dio_logger: + dependency: "direct main" + description: + name: pretty_dio_logger + sha256: "36f2101299786d567869493e2f5731de61ce130faa14679473b26905a92b6407" + url: "https://pub.dev" + source: hosted + version: "1.4.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + url: "https://pub.dev" + source: hosted + version: "1.3.4" source_span: dependency: transitive description: @@ -144,6 +488,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: @@ -168,6 +520,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.0" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" vector_math: dependency: transitive description: @@ -176,6 +544,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" web: dependency: transitive description: @@ -184,5 +560,21 @@ packages: url: "https://pub.dev" source: hosted version: "0.1.4-beta" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" + source: hosted + version: "2.4.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" sdks: dart: ">=3.1.3 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index b84d500..2300645 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: flutter_test_app -description: A new Flutter project. +description: "A new Flutter project." # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.1.3 <4.0.0' + sdk: ^3.1.3 # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -30,11 +30,16 @@ environment: dependencies: flutter: sdk: flutter + bloc: ^8.1.4 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 + cupertino_icons: ^1.0.8 + dio: ^5.4.2+1 + pretty_dio_logger: ^1.3.1 + json_annotation: ^4.8.1 + html: ^0.15.0 dev_dependencies: flutter_test: @@ -45,7 +50,9 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^2.0.0 + build_runner: ^2.4.9 + json_serializable: ^6.7.1 + flutter_lints: ^4.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec @@ -64,10 +71,10 @@ flutter: # - 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 + # https://flutter.dev/to/resolution-aware-images # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages + # https://flutter.dev/to/asset-from-package # To add custom fonts to your application, add a fonts section here, # in this "flutter" section. Each entry in this list should have a @@ -87,4 +94,4 @@ flutter: # weight: 700 # # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages + # see https://flutter.dev/to/font-from-package