Showing
10 changed files
with
54 additions
and
27 deletions
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | # This file should be version controlled. | 4 | # This file should be version controlled. |
5 | 5 | ||
6 | version: | 6 | version: |
7 | - revision: 9944297138845a94256f1cf37beb88ff9a8e811a | 7 | + revision: c07f7888888435fd9df505aa2efc38d3cf65681b |
8 | channel: stable | 8 | channel: stable |
9 | 9 | ||
10 | project_type: app | 10 | project_type: app |
@@ -13,26 +13,26 @@ project_type: app | @@ -13,26 +13,26 @@ project_type: app | ||
13 | migration: | 13 | migration: |
14 | platforms: | 14 | platforms: |
15 | - platform: root | 15 | - platform: root |
16 | - create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | ||
17 | - base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | 16 | + create_revision: c07f7888888435fd9df505aa2efc38d3cf65681b |
17 | + base_revision: c07f7888888435fd9df505aa2efc38d3cf65681b | ||
18 | - platform: android | 18 | - platform: android |
19 | - create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | ||
20 | - base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | 19 | + create_revision: c07f7888888435fd9df505aa2efc38d3cf65681b |
20 | + base_revision: c07f7888888435fd9df505aa2efc38d3cf65681b | ||
21 | - platform: ios | 21 | - platform: ios |
22 | - create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | ||
23 | - base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | 22 | + create_revision: c07f7888888435fd9df505aa2efc38d3cf65681b |
23 | + base_revision: c07f7888888435fd9df505aa2efc38d3cf65681b | ||
24 | - platform: linux | 24 | - platform: linux |
25 | - create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | ||
26 | - base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | 25 | + create_revision: c07f7888888435fd9df505aa2efc38d3cf65681b |
26 | + base_revision: c07f7888888435fd9df505aa2efc38d3cf65681b | ||
27 | - platform: macos | 27 | - platform: macos |
28 | - create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | ||
29 | - base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | 28 | + create_revision: c07f7888888435fd9df505aa2efc38d3cf65681b |
29 | + base_revision: c07f7888888435fd9df505aa2efc38d3cf65681b | ||
30 | - platform: web | 30 | - platform: web |
31 | - create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | ||
32 | - base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | 31 | + create_revision: c07f7888888435fd9df505aa2efc38d3cf65681b |
32 | + base_revision: c07f7888888435fd9df505aa2efc38d3cf65681b | ||
33 | - platform: windows | 33 | - platform: windows |
34 | - create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | ||
35 | - base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a | 34 | + create_revision: c07f7888888435fd9df505aa2efc38d3cf65681b |
35 | + base_revision: c07f7888888435fd9df505aa2efc38d3cf65681b | ||
36 | 36 | ||
37 | # User provided section | 37 | # User provided section |
38 | 38 |
@@ -7,7 +7,6 @@ | @@ -7,7 +7,6 @@ | ||
7 | 7 | ||
8 | # The following line activates a set of recommended lints for Flutter apps, | 8 | # The following line activates a set of recommended lints for Flutter apps, |
9 | # packages, and plugins designed to encourage good coding practices. | 9 | # packages, and plugins designed to encourage good coding practices. |
10 | -include: package:flutter_lints/flutter.yaml | ||
11 | 10 | ||
12 | linter: | 11 | linter: |
13 | # The lint rules applied to this project can be customized in the | 12 | # The lint rules applied to this project can be customized in the |
1 | import 'package:flutter/material.dart'; | 1 | import 'package:flutter/material.dart'; |
2 | import 'package:get/get.dart'; | 2 | import 'package:get/get.dart'; |
3 | 3 | ||
4 | -import 'en_us.dart'; | ||
5 | -import 'pt_br.dart'; | 4 | +import 'en_US.dart'; |
5 | +import 'pt_BR.dart'; | ||
6 | 6 | ||
7 | class TranslationService extends Translations { | 7 | class TranslationService extends Translations { |
8 | static Locale? get locale => Get.deviceLocale; | 8 | static Locale? get locale => Get.deviceLocale; |
@@ -15,6 +15,7 @@ class MyApp extends StatelessWidget { | @@ -15,6 +15,7 @@ class MyApp extends StatelessWidget { | ||
15 | @override | 15 | @override |
16 | Widget build(BuildContext context) { | 16 | Widget build(BuildContext context) { |
17 | return GetMaterialApp( | 17 | return GetMaterialApp( |
18 | + theme: ThemeData(useMaterial3: true), | ||
18 | debugShowCheckedModeBanner: false, | 19 | debugShowCheckedModeBanner: false, |
19 | enableLog: true, | 20 | enableLog: true, |
20 | logWriterCallback: Logger.write, | 21 | logWriterCallback: Logger.write, |
@@ -25,7 +25,9 @@ class CasesModel { | @@ -25,7 +25,9 @@ class CasesModel { | ||
25 | factory CasesModel.fromJson(Map<String, dynamic> json) => CasesModel( | 25 | factory CasesModel.fromJson(Map<String, dynamic> json) => CasesModel( |
26 | message: json["Message"] as String, | 26 | message: json["Message"] as String, |
27 | global: Global.fromJson(json["Global"] as Map<String, dynamic>), | 27 | global: Global.fromJson(json["Global"] as Map<String, dynamic>), |
28 | - countries: List<Country>.from((json["Countries"] as Iterable).map( | 28 | + countries: json["Countries"] == null |
29 | + ? [] | ||
30 | + : List<Country>.from((json["Countries"] as Iterable).map( | ||
29 | (x) => Country.fromJson(x as Map<String, dynamic>), | 31 | (x) => Country.fromJson(x as Map<String, dynamic>), |
30 | )), | 32 | )), |
31 | date: DateTime.parse(json["Date"] as String), | 33 | date: DateTime.parse(json["Date"] as String), |
@@ -18,7 +18,6 @@ class CountryView extends GetView<HomeController> { | @@ -18,7 +18,6 @@ class CountryView extends GetView<HomeController> { | ||
18 | "https://images.pexels.com/photos/3902882/pexels-photo-3902882.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940"))), | 18 | "https://images.pexels.com/photos/3902882/pexels-photo-3902882.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940"))), |
19 | child: BackdropFilter( | 19 | child: BackdropFilter( |
20 | filter: ImageFilter.blur(sigmaX: 15.0, sigmaY: 15.0), | 20 | filter: ImageFilter.blur(sigmaX: 15.0, sigmaY: 15.0), |
21 | - child: Container( | ||
22 | child: Scaffold( | 21 | child: Scaffold( |
23 | backgroundColor: Colors.transparent, | 22 | backgroundColor: Colors.transparent, |
24 | appBar: AppBar( | 23 | appBar: AppBar( |
@@ -35,8 +34,8 @@ class CountryView extends GetView<HomeController> { | @@ -35,8 +34,8 @@ class CountryView extends GetView<HomeController> { | ||
35 | return ListTile( | 34 | return ListTile( |
36 | onTap: () async { | 35 | onTap: () async { |
37 | //Get.rootDelegate.toNamed('/home/country'); | 36 | //Get.rootDelegate.toNamed('/home/country'); |
38 | - final data = await Get.toNamed( | ||
39 | - '/home/country/details?id=$index'); | 37 | + final data = |
38 | + await Get.toNamed('/home/country/details?id=$index'); | ||
40 | print(data); | 39 | print(data); |
41 | }, | 40 | }, |
42 | trailing: CircleAvatar( | 41 | trailing: CircleAvatar( |
@@ -52,7 +51,6 @@ class CountryView extends GetView<HomeController> { | @@ -52,7 +51,6 @@ class CountryView extends GetView<HomeController> { | ||
52 | ), | 51 | ), |
53 | ), | 52 | ), |
54 | ), | 53 | ), |
55 | - ), | ||
56 | ); | 54 | ); |
57 | } | 55 | } |
58 | } | 56 | } |
@@ -22,7 +22,6 @@ class DetailsView extends GetView<HomeController> { | @@ -22,7 +22,6 @@ class DetailsView extends GetView<HomeController> { | ||
22 | ), | 22 | ), |
23 | child: BackdropFilter( | 23 | child: BackdropFilter( |
24 | filter: ImageFilter.blur(sigmaX: 15.0, sigmaY: 15.0), | 24 | filter: ImageFilter.blur(sigmaX: 15.0, sigmaY: 15.0), |
25 | - child: Container( | ||
26 | child: Scaffold( | 25 | child: Scaffold( |
27 | backgroundColor: Colors.transparent, | 26 | backgroundColor: Colors.transparent, |
28 | appBar: AppBar( | 27 | appBar: AppBar( |
@@ -87,7 +86,6 @@ class DetailsView extends GetView<HomeController> { | @@ -87,7 +86,6 @@ class DetailsView extends GetView<HomeController> { | ||
87 | )), | 86 | )), |
88 | ), | 87 | ), |
89 | ), | 88 | ), |
90 | - ), | ||
91 | ); | 89 | ); |
92 | } | 90 | } |
93 | } | 91 | } |
@@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev | @@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev | ||
18 | version: 1.0.0+1 | 18 | version: 1.0.0+1 |
19 | 19 | ||
20 | environment: | 20 | environment: |
21 | - sdk: ">=2.12.0 <3.0.0" | 21 | + sdk: ">=2.19.1 <3.0.0" |
22 | 22 | ||
23 | dependency_overrides: | 23 | dependency_overrides: |
24 | get: | 24 | get: |
example/test/widget_test.dart
0 → 100644
1 | +// This is a basic Flutter widget test. | ||
2 | +// | ||
3 | +// To perform an interaction with a widget in your test, use the WidgetTester | ||
4 | +// utility in the flutter_test package. For example, you can send tap and scroll | ||
5 | +// gestures. You can also use WidgetTester to find child widgets in the widget | ||
6 | +// tree, read text, and verify that the values of widget properties are correct. | ||
7 | + | ||
8 | +import 'package:flutter/material.dart'; | ||
9 | +import 'package:flutter_test/flutter_test.dart'; | ||
10 | +import 'package:get_demo/main.dart'; | ||
11 | + | ||
12 | +void main() { | ||
13 | + testWidgets('Counter increments smoke test', (WidgetTester tester) async { | ||
14 | + // Build our app and trigger a frame. | ||
15 | + await tester.pumpWidget(const MyApp()); | ||
16 | + | ||
17 | + // Verify that our counter starts at 0. | ||
18 | + expect(find.text('0'), findsOneWidget); | ||
19 | + expect(find.text('1'), findsNothing); | ||
20 | + | ||
21 | + // Tap the '+' icon and trigger a frame. | ||
22 | + await tester.tap(find.byIcon(Icons.add)); | ||
23 | + await tester.pump(); | ||
24 | + | ||
25 | + // Verify that our counter has incremented. | ||
26 | + expect(find.text('0'), findsNothing); | ||
27 | + expect(find.text('1'), findsOneWidget); | ||
28 | + }); | ||
29 | +} |
@@ -15,7 +15,7 @@ dependencies: | @@ -15,7 +15,7 @@ dependencies: | ||
15 | dev_dependencies: | 15 | dev_dependencies: |
16 | flutter_test: | 16 | flutter_test: |
17 | sdk: flutter | 17 | sdk: flutter |
18 | - lints: ^1.0.1 | 18 | + lints: ^2.0.1 |
19 | 19 | ||
20 | 20 | ||
21 | # For information on the generic Dart part of this file, see the | 21 | # For information on the generic Dart part of this file, see the |
-
Please register or login to post a comment