This commit is contained in:
2025-11-26 13:48:01 +04:00
parent e076d9d65d
commit 13626e32df
12 changed files with 566 additions and 143 deletions

View File

@@ -0,0 +1,26 @@
import 'package:json_annotation/json_annotation.dart';
part 'cosmetics_dto.g.dart';
@JsonSerializable(createToJson: false)
class CosmeticsDto {
final List<CosmecticDataDto>? products;
const CosmeticsDto({this.products});
factory CosmeticsDto.fromJson(Map<String, dynamic> json) => _$CosmeticsDtoFromJson(json);
}
@JsonSerializable(createToJson: false)
class CosmecticDataDto {
final int? id;
@JsonKey(name: 'product_type')
final String? productType;
final String? name;
@JsonKey(name: 'image_link')
final String? imageLink;
const CosmecticDataDto({this.id, this.productType, this.name, this.imageLink});
factory CosmecticDataDto.fromJson(Map<String, dynamic> json) => _$CosmecticDataDtoFromJson(json);
}

View File

@@ -0,0 +1,21 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'cosmetics_dto.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
CosmeticsDto _$CosmeticsDtoFromJson(Map<String, dynamic> json) => CosmeticsDto(
products: (json['products'] as List<dynamic>?)
?.map((e) => CosmecticDataDto.fromJson(e as Map<String, dynamic>))
.toList(),
);
CosmecticDataDto _$CosmecticDataDtoFromJson(Map<String, dynamic> json) =>
CosmecticDataDto(
id: (json['id'] as num?)?.toInt(),
productType: json['product_type'] as String?,
name: json['name'] as String?,
imageLink: json['image_link'] as String?,
);

View File

@@ -0,0 +1,20 @@
import '../../domain/models/card.dart';
import '../dtos/cosmetics_dto.dart';
const _imagePlaceholder =
'https://seo2you.ru/upload/iblock/827/qu9e9ogf66nrclp0mtnnxak424jxose9.jpg';
extension CosmeticDataDtoToModel on CosmecticDataDto {
CardData toDomain() => CardData(
name ?? 'Unknown cosmetic product',
imageUrl: imageLink ?? _imagePlaceholder,
description: _buildDescription(),
price: (id ?? 0) * 10 + 100,
);
String _buildDescription() {
final type = productType ?? 'Unknown type';
final priceValue = ((id ?? 0) * 2 + 10);
return 'Product type: $type\nPrice: $priceValue dollars';
}
}

View File

@@ -11,7 +11,7 @@ class CardData {
this.name, {
required this.description,
this.imageUrl,
this.icon = Icons.ac_unit_outlined,
this.icon = Icons.shopping_cart,
required this.price,
});
}

View File

@@ -15,7 +15,7 @@ class MyApp extends StatelessWidget {
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
),
home: const MyHomePage(title: 'Фиолетовое Яблоко - магазин косметики'),
home: const MyHomePage(title: 'Maybelline - магазин косметики'),
);
}
}

View File

@@ -15,7 +15,7 @@ class _Card extends StatefulWidget {
this.name, {
required this.description,
this.imageUrl,
this.icon = Icons.ac_unit_outlined,
this.icon = Icons.shopping_cart,
required this.price,
this.onLike,
this.onTap,
@@ -105,6 +105,7 @@ class _CardState extends State<_Card> {
Text(
widget.name,
style: Theme.of(context).textTheme.headlineLarge,
maxLines: 3,
),
Text(
widget.description,

View File

@@ -2,6 +2,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_project/domain/models/card.dart';
import 'package:flutter_project/presentation/details_page/details_page.dart';
import 'package:flutter_project/repositories/cosmetic_repository.dart';
import 'package:flutter_project/repositories/mock_repository.dart';
part 'card.dart';
@@ -17,6 +19,7 @@ class MyHomePage extends StatefulWidget {
class _MyHomePageState extends State<MyHomePage> {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
@@ -29,7 +32,6 @@ class _MyHomePageState extends State<MyHomePage> {
),
);
});
super.initState();
}
@override
@@ -44,82 +46,69 @@ class _MyHomePageState extends State<MyHomePage> {
}
}
class Body extends StatelessWidget {
class Body extends StatefulWidget {
const Body({super.key});
@override
Widget build(BuildContext context) {
final data = [
CardData(
'Catrice',
description: 'Лак для ногтей',
imageUrl: 'https://cdn1.ozone.ru/s3/multimedia-1-r/7082406639.jpg',
icon: Icons.shopping_cart,
price: 456,
),
CardData(
'Darling',
description: 'Тушь для ресниц',
imageUrl:
'https://avatars.mds.yandex.net/get-vertis-journal/4469561/7_Byuti_nabory.png_1757063983772/845x845',
icon: Icons.shopping_cart,
price: 1922,
),
CardData(
'Stelary',
description: 'Карандаш для бровей',
imageUrl: 'https://ir.ozone.ru/s3/multimedia-v/c1000/6477525451.jpg',
icon: Icons.shopping_cart,
price: 1331,
),
CardData(
'Luxvisage',
description: 'Блеск для губ',
imageUrl: 'https://ir.ozone.ru/s3/multimedia-1-2/7060667942.jpg',
icon: Icons.shopping_cart,
price: 312,
),
CardData(
'ArtVisage',
description: 'Гель для бровей',
imageUrl:
'https://avatars.mds.yandex.net/get-mpic/4947485/2a00000194da1f4326d6fcab70498955305b/orig',
icon: Icons.shopping_cart,
price: 200,
),
CardData(
'Dove',
description: 'Гель для душа',
imageUrl:
'https://avatars.mds.yandex.net/get-mpic/12365257/2a0000018dfa83803ca84397ed724feb489c/orig',
icon: Icons.shopping_cart,
price: 289,
),
CardData(
'ManlyPro',
description: 'Тональная основа',
imageUrl:
'https://s5-frame.ozstatic.by/1000/228/378/101/101378228_0.jpg',
icon: Icons.shopping_cart,
price: 4200,
),
];
State<Body> createState() => _BodyState();
}
return Center(
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: data
.map(
(data) => _Card.fromData(
data,
onLike: (title, isLiked) =>
_showSnackBar(context, title, isLiked),
onTap: () => _navToDetails(context, data),
),
)
.toList(),
),
class _BodyState extends State<Body> {
final TextEditingController searchController = TextEditingController();
late Future<List<CardData>?> data;
@override
void initState() {
super.initState();
data = CosmeticsRepository().loadData();
}
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(12),
child: CupertinoSearchTextField( // поиск по типу продуктов
controller: searchController,
onChanged: (search) {
setState(() {
data = CosmeticsRepository().loadData(q: search);
});
},
),
),
Expanded(
child: Center(
child: FutureBuilder<List<CardData>?>(
future: data,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const CircularProgressIndicator();
} else if (snapshot.hasData && snapshot.data!.isNotEmpty) {
return SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: snapshot.data!.map((card) {
return _Card.fromData(
card,
onLike: (title, isLiked) =>
_showSnackBar(context, title, isLiked),
onTap: () => _navToDetails(context, card),
);
}).toList(),
),
);
} else {
return const Center(child: Text('Продукты не найдены'));
}
},
),
),
),
],
),
);
}

View File

@@ -0,0 +1,7 @@
import 'package:flutter_project/domain/models/card.dart';
typedef OnErrorCallback = void Function(Object? error);
abstract class ApiInterface {
Future<List<CardData>?> loadData();
}

View File

@@ -0,0 +1,41 @@
import 'package:dio/dio.dart';
import 'package:pretty_dio_logger/pretty_dio_logger.dart';
import 'package:flutter_project/data/mappers/cosmetics_mapper.dart';
import '../data/dtos/cosmetics_dto.dart';
import '../domain/models/card.dart';
import 'api_interface.dart';
class CosmeticsRepository implements ApiInterface {
static final Dio _dio = Dio()
..interceptors.add(PrettyDioLogger(
requestHeader: true,
requestBody: true,
));
static const String _baseUrl = 'https://makeup-api.herokuapp.com';
Future<List<CardData>?> loadData({String? q, OnErrorCallback? onError}) async {
try {
const String url = '$_baseUrl/api/v1/products.json';
final Response<dynamic> response = await _dio.get<List<dynamic>>(
url,
queryParameters: {
'brand': 'maybelline', // фиксированный бренд
if (q != null && q.isNotEmpty) // тип продукта из поиска
'product_type': q.toLowerCase(),
},
);
final List<dynamic> rawList = response.data ?? [];
final List<CosmecticDataDto> dto = rawList
.map((e) => CosmecticDataDto.fromJson(e as Map<String, dynamic>))
.toList();
return dto.map((e) => e.toDomain()).toList();
} on DioException catch (e) {
onError?.call(e.error);
return null;
}
}
}

View File

@@ -0,0 +1,33 @@
import '../domain/models/card.dart';
import 'api_interface.dart';
import 'package:flutter/material.dart';
class MockRepository extends ApiInterface {
@override
Future<List<CardData>> loadData() async {
return [
CardData(
'Catrice',
description: 'Лак для ногтей',
imageUrl: 'https://cdn1.ozone.ru/s3/multimedia-1-r/7082406639.jpg',
icon: Icons.shopping_cart,
price: 456,
),
CardData(
'Darling',
description: 'Тушь для ресниц',
imageUrl:
'https://avatars.mds.yandex.net/get-vertis-journal/4469561/7_Byuti_nabory.png_1757063983772/845x845',
icon: Icons.shopping_cart,
price: 1922,
),
CardData(
'Stelary',
description: 'Карандаш для бровей',
imageUrl: 'https://ir.ozone.ru/s3/multimedia-v/c1000/6477525451.jpg',
icon: Icons.shopping_cart,
price: 1331,
),
];
}
}

View File

@@ -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: "5b7468c326d2f8a4f630056404ca0d291ade42918f4a3c6233618e724f39da8e"
url: "https://pub.dev"
source: hosted
version: "92.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: "70e4b1ef8003c64793a9e268a551a82869a8a96f39deb73dea28084b0e8bf75e"
url: "https://pub.dev"
source: hosted
version: "9.0.0"
args:
dependency: transitive
description:
name: args
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
url: "https://pub.dev"
source: hosted
version: "2.7.0"
async:
dependency: transitive
description:
@@ -17,6 +41,54 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.2"
build:
dependency: transitive
description:
name: build
sha256: c1668065e9ba04752570ad7e038288559d1e2ca5c6d0131c0f5f55e39e777413
url: "https://pub.dev"
source: hosted
version: "4.0.3"
build_config:
dependency: transitive
description:
name: build_config
sha256: "4f64382b97504dc2fcdf487d5aae33418e08b4703fc21249e4db6d804a4d0187"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
build_daemon:
dependency: transitive
description:
name: build_daemon
sha256: bf05f6e12cfea92d3c09308d7bcdab1906cd8a179b023269eed00c071004b957
url: "https://pub.dev"
source: hosted
version: "4.1.1"
build_runner:
dependency: "direct dev"
description:
name: build_runner
sha256: "110c56ef29b5eb367b4d17fc79375fa8c18a6cd7acd92c05bb3986c17a079057"
url: "https://pub.dev"
source: hosted
version: "2.10.4"
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: "426cf75afdb23aa74bd4e471704de3f9393f3c7b04c1e2d9c6f1073ae0b8b139"
url: "https://pub.dev"
source: hosted
version: "8.12.1"
characters:
dependency: transitive
description:
@@ -25,6 +97,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.4.0"
checked_yaml:
dependency: transitive
description:
name: checked_yaml
sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f"
url: "https://pub.dev"
source: hosted
version: "2.0.4"
clock:
dependency: transitive
description:
@@ -33,6 +113,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.2"
code_builder:
dependency: transitive
description:
name: code_builder
sha256: "11654819532ba94c34de52ff5feb52bd81cba1de00ef2ed622fd50295f9d4243"
url: "https://pub.dev"
source: hosted
version: "4.11.0"
collection:
dependency: transitive
description:
@@ -41,6 +129,22 @@ 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:
name: crypto
sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf
url: "https://pub.dev"
source: hosted
version: "3.0.7"
cupertino_icons:
dependency: "direct main"
description:
@@ -49,6 +153,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.8"
dart_style:
dependency: transitive
description:
name: dart_style
sha256: a9c30492da18ff84efe2422ba2d319a89942d93e58eb0b73d32abe822ef54b7b
url: "https://pub.dev"
source: hosted
version: "3.1.3"
dio:
dependency: "direct main"
description:
name: dio
sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9
url: "https://pub.dev"
source: hosted
version: "5.9.0"
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:
@@ -57,6 +185,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.3"
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
@@ -75,6 +219,62 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
glob:
dependency: transitive
description:
name: glob
sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de
url: "https://pub.dev"
source: hosted
version: "2.1.3"
graphs:
dependency: transitive
description:
name: graphs
sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
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:
name: http_parser
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev"
source: hosted
version: "4.1.2"
io:
dependency: transitive
description:
name: io
sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b
url: "https://pub.dev"
source: hosted
version: "1.0.5"
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: "6b253f7851cf1626a05c8b49c792e04a14897349798c03798137f2b5f7e0b5b1"
url: "https://pub.dev"
source: hosted
version: "6.11.3"
leak_tracker:
dependency: transitive
description:
@@ -107,6 +307,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.1.1"
logging:
dependency: transitive
description:
name: logging
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
url: "https://pub.dev"
source: hosted
version: "1.3.0"
matcher:
dependency: transitive
description:
@@ -131,6 +339,22 @@ 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"
package_config:
dependency: transitive
description:
name: package_config
sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc
url: "https://pub.dev"
source: hosted
version: "2.2.0"
path:
dependency: transitive
description:
@@ -139,11 +363,75 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.1"
pool:
dependency: transitive
description:
name: pool
sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d"
url: "https://pub.dev"
source: hosted
version: "1.5.2"
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: "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"
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"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
source_gen:
dependency: transitive
description:
name: source_gen
sha256: "07b277b67e0096c45196cbddddf2d8c6ffc49342e88bf31d460ce04605ddac75"
url: "https://pub.dev"
source: hosted
version: "4.1.1"
source_helper:
dependency: transitive
description:
name: source_helper
sha256: e82b1996c63da42aa3e6a34cc1ec17427728a1baf72ed017717a5669a7123f0d
url: "https://pub.dev"
source: hosted
version: "1.3.9"
source_span:
dependency: transitive
description:
@@ -168,6 +456,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:
@@ -192,6 +488,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.7.6"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
source: hosted
version: "1.4.0"
vector_math:
dependency: transitive
description:
@@ -208,6 +512,46 @@ packages:
url: "https://pub.dev"
source: hosted
version: "15.0.2"
watcher:
dependency: transitive
description:
name: watcher
sha256: "592ab6e2892f67760543fb712ff0177f4ec76c031f02f5b4ff8d3fc5eb9fb61a"
url: "https://pub.dev"
source: hosted
version: "1.1.4"
web:
dependency: transitive
description:
name: web
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
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"
yaml:
dependency: transitive
description:
name: yaml
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
url: "https://pub.dev"
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.9.2 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"

View File

@@ -1,89 +1,30 @@
name: 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
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: ^3.9.2
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
json_annotation: ^4.8.1
dio: ^5.4.2+1
pretty_dio_logger: ^1.3.1
dev_dependencies:
flutter_test:
sdk: flutter
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# 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.
build_runner: ^2.4.9
json_serializable: ^6.7.1
flutter_lints: ^5.0.0
# 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:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# 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/to/resolution-aware-images
# For details regarding adding assets from package dependencies, see
# 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
# "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/to/font-from-package