forked from eatvio/eatvio_app
resolve dart analyze
This commit is contained in:
@@ -8,6 +8,7 @@ import 'package:flutter_svg/svg.dart';
|
||||
|
||||
class TypeBadges extends StatefulWidget {
|
||||
const TypeBadges({super.key, required this.type});
|
||||
|
||||
final DietType type;
|
||||
|
||||
@override
|
||||
@@ -16,6 +17,7 @@ class TypeBadges extends StatefulWidget {
|
||||
|
||||
class _TypeBadgesState extends State<TypeBadges> {
|
||||
final List<bool> overlaysVisibilityState = [false, false, false, false];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final s = S.of(context);
|
||||
@@ -117,11 +119,18 @@ class _TypeBadgesState extends State<TypeBadges> {
|
||||
}
|
||||
|
||||
class _InfoOverlayEntry extends StatelessWidget {
|
||||
const _InfoOverlayEntry({super.key, required this.title, required this.description, required this.assetPath, required this.onClose});
|
||||
const _InfoOverlayEntry({
|
||||
required this.title,
|
||||
required this.description,
|
||||
required this.assetPath,
|
||||
required this.onClose,
|
||||
});
|
||||
|
||||
final String title;
|
||||
final String description;
|
||||
final assetPath;
|
||||
final void Function() onClose;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MainBackgroundBouble(
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:retrofit/retrofit.dart';
|
||||
|
||||
part 'diets_service.g.dart';
|
||||
|
||||
@RestApi()
|
||||
abstract class DietsService {
|
||||
|
||||
factory DietsService(Dio dio, {String baseUrl}) = _DietsService;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'diets_service.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// RetrofitGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element,unnecessary_string_interpolations
|
||||
|
||||
class _DietsService implements DietsService {
|
||||
_DietsService(
|
||||
this._dio, {
|
||||
this.baseUrl,
|
||||
this.errorLogger,
|
||||
});
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
String? baseUrl;
|
||||
|
||||
final ParseErrorLogger? errorLogger;
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
requestOptions.responseType = ResponseType.json;
|
||||
}
|
||||
}
|
||||
return requestOptions;
|
||||
}
|
||||
|
||||
String _combineBaseUrls(
|
||||
String dioBaseUrl,
|
||||
String? baseUrl,
|
||||
) {
|
||||
if (baseUrl == null || baseUrl.trim().isEmpty) {
|
||||
return dioBaseUrl;
|
||||
}
|
||||
|
||||
final url = Uri.parse(baseUrl);
|
||||
|
||||
if (url.isAbsolute) {
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
return Uri.parse(dioBaseUrl).resolveUri(url).toString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user