Skip to content

Commit

Permalink
feat: bump dart version and various fixes
Browse files Browse the repository at this point in the history
- bump dart version to >=3.0
- fix analysis_options depreciations
- fix bin filename
- apply dart fixes
  • Loading branch information
Jupi007 committed Aug 22, 2023
1 parent f8f7149 commit 6945790
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 87 deletions.
10 changes: 3 additions & 7 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ analyzer:
language:
strict-inference: true
strict-raw-types: true
strong-mode:
implicit-casts: false
implicit-dynamic: false
strict-casts: true
exclude:
# Build
- "**/build/**"
Expand Down Expand Up @@ -72,11 +70,10 @@ linter:
- file_names
- hash_and_equals
- implementation_imports
- iterable_contains_unrelated_type
- collection_methods_unrelated_type
- join_return_with_assignment
- library_names
- library_prefixes
- list_remove_unrelated_type
- literal_only_boolean_expressions
- no_adjacent_strings_in_list
- no_duplicate_case_values
Expand All @@ -100,7 +97,6 @@ linter:
- prefer_const_literals_to_create_immutables
- prefer_constructors_over_static_methods
- prefer_contains
- prefer_equal_for_default_values
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
Expand Down Expand Up @@ -158,4 +154,4 @@ linter:
- use_string_buffers
- use_to_and_as_if_applicable
- valid_regexps
- void_checks
- void_checks
File renamed without changes.
14 changes: 9 additions & 5 deletions example/flutter_usage/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,30 @@ import 'package:flutter/material.dart';

import 'ui/icons.dart';

void main() => runApp(MyApp());
void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
const MyApp({super.key});

// This widget is the root of your application.
@override
Widget build(BuildContext context) => MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(primarySwatch: Colors.blue),
home: MyHomePage(),
home: const MyHomePage(),
);
}

class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});

@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(
title: Text('Icons view test'),
title: const Text('Icons view test'),
),
body: Padding(
padding: EdgeInsets.all(16),
padding: const EdgeInsets.all(16),
child: Column(
children: [
UiIcons.account,
Expand All @@ -30,7 +34,7 @@ class MyHomePage extends StatelessWidget {
UiIcons.arrowRight,
]
.map((iconData) => Padding(
padding: EdgeInsets.all(16),
padding: const EdgeInsets.all(16),
child: Icon(iconData),
))
.cast<Widget>()
Expand Down
3 changes: 1 addition & 2 deletions lib/src/otf/io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ OpenTypeFont readFromFile(String path) =>

/// Writes OpenType font to a file.
void writeToFile(String path, OpenTypeFont font) {
final file = File(path);
file.createSync(recursive: true);
final file = File(path)..createSync(recursive: true);
final byteData = OTFWriter().write(font);
final extension = p.extension(file.path).toLowerCase();

Expand Down
Loading

0 comments on commit 6945790

Please sign in to comment.