mirror of
https://github.com/smmarty/friflex_flutter_starter.git
synced 2025-12-22 09:30:45 +00:00
chore(app): обновление flutter и пакетов (#38)
* chore(pubspec,di): Обновить версии SDK и исправить использование AppEnv * chore(readme): Обновить версии Flutter и Dart, добавить новые библиотеки --------- Co-authored-by: petrovyuri <petrovyuri@example.com>
This commit is contained in:
@@ -6,7 +6,6 @@ import 'package:friflex_starter/app/ui_kit/app_snackbar.dart';
|
||||
import 'package:friflex_starter/features/update/domain/state/cubit/update_cubit.dart';
|
||||
import 'package:friflex_starter/features/update/presentation/components/soft_modal_sheet.dart';
|
||||
import 'package:friflex_starter/features/update/update_routes.dart';
|
||||
import 'package:friflex_starter/features/update/update_type.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
@@ -79,7 +78,7 @@ class _ComponentsScreenState extends State<ComponentsScreen> {
|
||||
onPressed: () {
|
||||
final updateCubitState = context.read<UpdateCubit>().state;
|
||||
if (updateCubitState is UpdateSuccessState &&
|
||||
updateCubitState.updateInfo.updateType == UpdateType.soft) {
|
||||
updateCubitState.updateInfo.updateType == .soft) {
|
||||
unawaited(
|
||||
SoftUpdateModal.show(
|
||||
context,
|
||||
|
||||
@@ -3,11 +3,9 @@ import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:friflex_starter/app/app_context_ext.dart';
|
||||
import 'package:friflex_starter/app/app_env.dart';
|
||||
import 'package:friflex_starter/features/debug/debug_routes.dart';
|
||||
import 'package:friflex_starter/features/update/domain/state/cubit/update_cubit.dart';
|
||||
import 'package:friflex_starter/features/update/presentation/components/soft_modal_sheet.dart';
|
||||
import 'package:friflex_starter/features/update/update_type.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
/// {@template root_screen}
|
||||
@@ -47,7 +45,7 @@ class _RootScreenState extends State<RootScreen> {
|
||||
|
||||
// Проверяем только состояние успеха с доступной информацией об обновлении
|
||||
if (updateState is UpdateSuccessState &&
|
||||
updateState.updateInfo.updateType == UpdateType.soft) {
|
||||
updateState.updateInfo.updateType == .soft) {
|
||||
unawaited(
|
||||
SoftUpdateModal.show(
|
||||
context,
|
||||
@@ -64,7 +62,7 @@ class _RootScreenState extends State<RootScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
floatingActionButton: context.di.env != AppEnv.prod
|
||||
floatingActionButton: context.di.env != .prod
|
||||
? FloatingActionButton(
|
||||
child: const Icon(Icons.bug_report),
|
||||
onPressed: () {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import 'package:friflex_starter/features/update/domain/entity/update_entity.dart';
|
||||
import 'package:friflex_starter/features/update/domain/repository/i_update_repository.dart';
|
||||
import 'package:friflex_starter/features/update/update_type.dart';
|
||||
|
||||
/// Мок обновления обязательное, можно использовать для тестирования
|
||||
const mockHardUpdateEntity = UpdateEntity(
|
||||
availableVersion: '2.0.0',
|
||||
updateUrl: 'https://example.com/update',
|
||||
updateType: UpdateType.hard,
|
||||
updateType: .hard,
|
||||
whatIsNew: 'Добавлены новые функции и исправлены ошибки.',
|
||||
);
|
||||
|
||||
@@ -14,7 +13,7 @@ const mockHardUpdateEntity = UpdateEntity(
|
||||
const mockSoftUpdateEntity = UpdateEntity(
|
||||
availableVersion: '2.0.0',
|
||||
updateUrl: 'https://example.com/update',
|
||||
updateType: UpdateType.soft,
|
||||
updateType: .soft,
|
||||
whatIsNew: 'Добавлены новые функции и исправлены ошибки.',
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user