Skip to content

Commit 20efa24

Browse files
committed
Updation of All the packages inside pubspec.yaml to latest one so that this project can be run using latest dart SDK
1 parent f01ac8b commit 20efa24

File tree

5 files changed

+87
-8
lines changed

5 files changed

+87
-8
lines changed

android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
}
66

77
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.0.1'
8+
classpath 'com.android.tools.build:gradle:3.2.1'
99
}
1010
}
1111

android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

lib/generated/i18n.dart

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
2+
import 'dart:async';
3+
4+
import 'package:flutter/foundation.dart';
5+
import 'package:flutter/material.dart';
6+
// ignore_for_file: non_constant_identifier_names
7+
// ignore_for_file: camel_case_types
8+
// ignore_for_file: prefer_single_quotes
9+
10+
//This file is automatically generated. DO NOT EDIT, all your changes would be lost.
11+
12+
class S implements WidgetsLocalizations {
13+
const S();
14+
15+
static const GeneratedLocalizationsDelegate delegate =
16+
const GeneratedLocalizationsDelegate();
17+
18+
static S of(BuildContext context) =>
19+
Localizations.of<S>(context, WidgetsLocalizations);
20+
21+
@override
22+
TextDirection get textDirection => TextDirection.ltr;
23+
24+
}
25+
26+
class en extends S {
27+
const en();
28+
}
29+
30+
31+
class GeneratedLocalizationsDelegate extends LocalizationsDelegate<WidgetsLocalizations> {
32+
const GeneratedLocalizationsDelegate();
33+
34+
List<Locale> get supportedLocales {
35+
return const <Locale>[
36+
37+
const Locale("en", ""),
38+
39+
];
40+
}
41+
42+
LocaleResolutionCallback resolution({Locale fallback}) {
43+
return (Locale locale, Iterable<Locale> supported) {
44+
final Locale languageLocale = new Locale(locale.languageCode, "");
45+
if (supported.contains(locale))
46+
return locale;
47+
else if (supported.contains(languageLocale))
48+
return languageLocale;
49+
else {
50+
final Locale fallbackLocale = fallback ?? supported.first;
51+
return fallbackLocale;
52+
}
53+
};
54+
}
55+
56+
@override
57+
Future<WidgetsLocalizations> load(Locale locale) {
58+
final String lang = getLang(locale);
59+
switch (lang) {
60+
61+
case "en":
62+
return new SynchronousFuture<WidgetsLocalizations>(const en());
63+
64+
default:
65+
return new SynchronousFuture<WidgetsLocalizations>(const S());
66+
}
67+
}
68+
69+
@override
70+
bool isSupported(Locale locale) => supportedLocales.contains(locale);
71+
72+
@override
73+
bool shouldReload(GeneratedLocalizationsDelegate old) => false;
74+
}
75+
76+
String getLang(Locale l) => l.countryCode != null && l.countryCode.isEmpty
77+
? l.languageCode
78+
: l.toString();

pubspec.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ dependencies:
55
flutter:
66
sdk: flutter
77

8-
flutter_launcher_icons: ^0.3.3
9-
shared_preferences: ^0.4.2
10-
json_annotation: ^0.2.4
8+
flutter_launcher_icons: ^0.6.1
9+
shared_preferences: ^0.4.3
10+
json_annotation: ^2.0.0
1111
cupertino_icons: ^0.1.2
12-
http: ^0.11.3+16
12+
http: ^0.12.0
1313

1414
flutter_icons:
1515
image_path: "assets/images/ic_launcher.png"
1616
android: true
1717
ios: true
1818

1919
dev_dependencies:
20-
build_runner: ^0.8.0
21-
json_serializable: ^0.5.2
20+
build_runner: ^1.1.2
21+
json_serializable: ^2.0.0
2222

2323
flutter_test:
2424
sdk: flutter

res/values/strings_en.arb

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)