Adapt README, Switch to Stacked instead of outdated provider_architecture, Update dependencies

This commit is contained in:
Varakh 2021-05-07 19:45:08 +02:00
parent 9b440ee63c
commit dbe1604329
6 changed files with 19 additions and 22 deletions

View file

@ -32,8 +32,7 @@ Start by installing dependencies and generating entities!
### Working versions for SDK
```
[✓] Flutter (Channel stable, 2.0.4, on Linux, locale de_DE.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Flutter (Channel stable, 2.0.6, on Linux, locale de_DE.UTF-8)
```
## Dependencies

View file

@ -1,7 +1,5 @@
import 'package:flutter/material.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 'core/enums/refresh_event.dart';

View file

@ -31,7 +31,7 @@ class Api implements ApiErrorConverter {
try {
_logger
.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);
return response;
} on TimeoutException {

View file

@ -1,4 +1,4 @@
import 'package:flutter_translate/global.dart';
import 'package:flutter_translate/flutter_translate.dart';
import 'package:logger/logger.dart';
import 'package:url_launcher/url_launcher.dart';

View file

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:provider_architecture/provider_architecture.dart';
import 'package:stacked/stacked.dart';
import '../../core/enums/viewstate.dart';
import '../../core/viewmodels/startup_model.dart';
@ -10,7 +10,7 @@ class StartUpView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ViewModelProvider<StartUpViewModel>.withConsumer(
return ViewModelBuilder<StartUpViewModel>.reactive(
viewModelBuilder: () => StartUpViewModel(),
onModelReady: (model) => model.handleStartUpLogic(),
builder: (context, model, child) => Scaffold(

View file

@ -19,28 +19,28 @@ environment:
dependencies:
flutter:
sdk: flutter
cupertino_icons: 1.0.2
cupertino_icons: 1.0.3
flutter_localizations:
sdk: flutter
flutter_translate: 1.6.0
provider: 4.3.3
provider_architecture: 1.1.1+1
get_it: 3.1.0 # major changes > 3
flutter_translate: 3.0.0
provider: 5.0.0
stacked: 2.1.1
get_it: 6.1.1 # major changes > 7
logger: 1.0.0
shared_preferences: 2.0.5
http: 0.12.2
json_annotation: 3.1.1
validators: 2.0.1
flutter_linkify: 4.1.0
url_launcher: 5.7.10
expandable: 4.1.4
share: 0.6.5+4
file_picker: 2.1.7
http: 0.13.3
validators: 3.0.0
flutter_linkify: 5.0.2
url_launcher: 6.0.3
expandable: 5.0.1
share: 2.0.1
file_picker: 3.0.1
clipboard: 0.1.3
receive_sharing_intent: 1.4.5
permission_handler: 5.1.0+2
permission_handler: 7.1.0
package_info: 2.0.0
simple_gesture_detector: 0.2.0
json_annotation: 3.1.1
dev_dependencies:
flutter_test: