Skip to content

Commit df6158a

Browse files
jinosh05michaelspiss
authored andcommitted
Removed Warnings
1 parent 8a8f65b commit df6158a

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class FontAwesomeGalleryApp extends StatelessWidget {
1717
theme: ThemeData.light().copyWith(
1818
iconTheme: const IconThemeData(size: 36.0, color: Colors.black87),
1919
textTheme: const TextTheme(
20-
bodyText2: TextStyle(fontSize: 16.0, color: Colors.black87),
20+
bodyMedium: TextStyle(fontSize: 16.0, color: Colors.black87),
2121
),
2222
),
2323
home: const FontAwesomeGalleryHome(),

util/lib/main.dart

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ void main(List<String> rawArgs) async {
103103
const repositoryName = 'FortAwesome/Font-Awesome';
104104
final defaultBranch = await getRepositoryDefaultBranch(repositoryName);
105105
print(blue(
106-
'Choosing branch "$defaultBranch" of repository https://github.com/' +
107-
repositoryName));
106+
'Choosing branch "$defaultBranch" of repository https://github.com/$repositoryName'));
108107
await download(
109108
'https://raw.githubusercontent.com/FortAwesome/Font-Awesome/$defaultBranch/metadata/icons.json',
110109
File('lib/fonts/icons.json'));
@@ -228,7 +227,7 @@ void adjustPubspecFontIncludes(Set<String> styles) {
228227
/// Comments out a line of yaml code. Does nothing if already commented
229228
String commentYamlLine(String line) {
230229
if (line.startsWith('#')) return line;
231-
return '#' + line;
230+
return '#$line';
232231
}
233232

234233
/// Uncomments a line of yaml code. Does nothing if not commented.
@@ -455,7 +454,7 @@ String styleToDataSource(String style) {
455454
/// using the latest version, this tool always selects the default branch.
456455
Future<String> getRepositoryDefaultBranch(String repositoryName) async {
457456
final tmpFile = File('fa-repo-metadata.tmp');
458-
await download('https://api.github.com/repos/' + repositoryName, tmpFile);
457+
await download('https://api.github.com/repos/$repositoryName', tmpFile);
459458
try {
460459
String rawGithubMetadata = await tmpFile.readAsString();
461460
Map<String, dynamic> githubMetadata = json.decode(rawGithubMetadata);
@@ -476,12 +475,10 @@ Future printVersionNotice(String repositoryName) async {
476475
try {
477476
final packageVersion = pub.Version.parse(getPackageVersion());
478477

479-
print(blue(
480-
'Using font_awesome_flutter version ' + packageVersion.toString()));
478+
print(blue('Using font_awesome_flutter version $packageVersion'));
481479

482480
await download(
483-
'https://api.github.com/repos/' + repositoryName + '/releases',
484-
tmpFile);
481+
'https://api.github.com/repos/$repositoryName/releases', tmpFile);
485482

486483
String rawReleasesData = await tmpFile.readAsString();
487484
List releasesData = json.decode(rawReleasesData);
@@ -509,17 +506,13 @@ Future printVersionNotice(String repositoryName) async {
509506
final primaryPreRelease = pub.Version.primary(preReleases);
510507

511508
if (primaryRelease > packageVersion) {
512-
print(red('A new version (' +
513-
primaryRelease.toString() +
514-
') of font_awesome_flutter is available. Please update before reporting any errors. You can update via `git pull` or by downloading the source code from github. (https://github.com/' +
515-
repositoryName +
516-
')'));
509+
print(red(
510+
'A new version ($primaryRelease) of font_awesome_flutter is available. Please update before reporting any errors. You can update via `git pull` or by downloading the source code from github. (https://github.com/$repositoryName)'));
517511
}
518512
if (primaryPreRelease > packageVersion &&
519513
primaryPreRelease > primaryRelease) {
520-
print(yellow('A pre-release version (' +
521-
primaryPreRelease.toString() +
522-
') of font_awesome_flutter is available. Should you encounter any problems, have a look if it fixes them.'));
514+
print(yellow(
515+
'A pre-release version ($primaryPreRelease) of font_awesome_flutter is available. Should you encounter any problems, have a look if it fixes them.'));
523516
}
524517
} on FormatException catch (_) {
525518
print(red(

0 commit comments

Comments
 (0)