Adapt README, Switch to Stacked instead of outdated provider_architecture, Update dependencies
This commit is contained in:
parent
9b440ee63c
commit
dbe1604329
6 changed files with 19 additions and 22 deletions
|
@ -32,8 +32,7 @@ Start by installing dependencies and generating entities!
|
||||||
### Working versions for SDK
|
### Working versions for SDK
|
||||||
|
|
||||||
```
|
```
|
||||||
[✓] Flutter (Channel stable, 2.0.4, on Linux, locale de_DE.UTF-8)
|
[✓] Flutter (Channel stable, 2.0.6, on Linux, locale de_DE.UTF-8)
|
||||||
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_translate/flutter_translate.dart';
|
import 'package:flutter_translate/flutter_translate.dart';
|
||||||
import 'package:flutter_translate/localization_provider.dart';
|
|
||||||
import 'package:flutter_translate/localized_app.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import 'core/enums/refresh_event.dart';
|
import 'core/enums/refresh_event.dart';
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Api implements ApiErrorConverter {
|
||||||
try {
|
try {
|
||||||
_logger
|
_logger
|
||||||
.d("Requesting GET API endpoint '${_url + route}' with headers '$_headers' and maximum timeout '$_timeout'");
|
.d("Requesting GET API endpoint '${_url + route}' with headers '$_headers' and maximum timeout '$_timeout'");
|
||||||
var response = await http.get(_url + route, headers: _headers).timeout(_timeout);
|
var response = await http.get(Uri.parse(_url + route), headers: _headers).timeout(_timeout);
|
||||||
handleRestErrors(response);
|
handleRestErrors(response);
|
||||||
return response;
|
return response;
|
||||||
} on TimeoutException {
|
} on TimeoutException {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import 'package:flutter_translate/global.dart';
|
import 'package:flutter_translate/flutter_translate.dart';
|
||||||
import 'package:logger/logger.dart';
|
import 'package:logger/logger.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider_architecture/provider_architecture.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
|
|
||||||
import '../../core/enums/viewstate.dart';
|
import '../../core/enums/viewstate.dart';
|
||||||
import '../../core/viewmodels/startup_model.dart';
|
import '../../core/viewmodels/startup_model.dart';
|
||||||
|
@ -10,7 +10,7 @@ class StartUpView extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ViewModelProvider<StartUpViewModel>.withConsumer(
|
return ViewModelBuilder<StartUpViewModel>.reactive(
|
||||||
viewModelBuilder: () => StartUpViewModel(),
|
viewModelBuilder: () => StartUpViewModel(),
|
||||||
onModelReady: (model) => model.handleStartUpLogic(),
|
onModelReady: (model) => model.handleStartUpLogic(),
|
||||||
builder: (context, model, child) => Scaffold(
|
builder: (context, model, child) => Scaffold(
|
||||||
|
|
28
pubspec.yaml
28
pubspec.yaml
|
@ -19,28 +19,28 @@ environment:
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
cupertino_icons: 1.0.2
|
cupertino_icons: 1.0.3
|
||||||
flutter_localizations:
|
flutter_localizations:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_translate: 1.6.0
|
flutter_translate: 3.0.0
|
||||||
provider: 4.3.3
|
provider: 5.0.0
|
||||||
provider_architecture: 1.1.1+1
|
stacked: 2.1.1
|
||||||
get_it: 3.1.0 # major changes > 3
|
get_it: 6.1.1 # major changes > 7
|
||||||
logger: 1.0.0
|
logger: 1.0.0
|
||||||
shared_preferences: 2.0.5
|
shared_preferences: 2.0.5
|
||||||
http: 0.12.2
|
http: 0.13.3
|
||||||
json_annotation: 3.1.1
|
validators: 3.0.0
|
||||||
validators: 2.0.1
|
flutter_linkify: 5.0.2
|
||||||
flutter_linkify: 4.1.0
|
url_launcher: 6.0.3
|
||||||
url_launcher: 5.7.10
|
expandable: 5.0.1
|
||||||
expandable: 4.1.4
|
share: 2.0.1
|
||||||
share: 0.6.5+4
|
file_picker: 3.0.1
|
||||||
file_picker: 2.1.7
|
|
||||||
clipboard: 0.1.3
|
clipboard: 0.1.3
|
||||||
receive_sharing_intent: 1.4.5
|
receive_sharing_intent: 1.4.5
|
||||||
permission_handler: 5.1.0+2
|
permission_handler: 7.1.0
|
||||||
package_info: 2.0.0
|
package_info: 2.0.0
|
||||||
simple_gesture_detector: 0.2.0
|
simple_gesture_detector: 0.2.0
|
||||||
|
json_annotation: 3.1.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
Loading…
Reference in a new issue