Skip to content

Commit

Permalink
Upgrade example to Dart 3.0
Browse files Browse the repository at this point in the history
Signed-off-by: Mateus Felipe C. C. Pinto <[email protected]>
  • Loading branch information
mateusfccp committed Apr 15, 2024
1 parent d3e68e6 commit 9e70a8c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ void main() {
runApp(const App());
}

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

@override
Expand All @@ -22,7 +22,7 @@ class App extends StatelessWidget {
}
}

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

@override
Expand Down Expand Up @@ -80,15 +80,15 @@ class Main extends StatelessWidget {
}
}

class _TextPrototype extends StatelessWidget {
const _TextPrototype({Key? key}) : super(key: key);
final class _TextPrototype extends StatelessWidget {
const _TextPrototype();

@override
Widget build(BuildContext context) => const Text('Lorem ipsum dolor sit amet');
}

class _SizedBoxPrototype extends StatelessWidget {
const _SizedBoxPrototype({Key? key}) : super(key: key);
final class _SizedBoxPrototype extends StatelessWidget {
const _SizedBoxPrototype();

@override
Widget build(BuildContext context) => const SizedBox.square(dimension: 64.0);
Expand Down
10 changes: 5 additions & 5 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ packages:
dependency: "direct dev"
description:
name: flutter_lints
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.2"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -95,10 +95,10 @@ packages:
dependency: transitive
description:
name: lints
sha256: "5cfd6509652ff5e7fe149b6df4859e687fca9048437857cb2e65c8d780f396e3"
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
url: "https://pub.dev"
source: hosted
version: "2.0.0"
version: "3.0.0"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -137,7 +137,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.0.1"
version: "2.0.2"
sky_engine:
dependency: transitive
description: flutter
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: example
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: 'none'
version: 1.0.0+1

environment:
sdk: ">=2.17.6 <3.0.0"
sdk: ">=3.0.0 <4.0.0"

dependencies:
prototype_constrained_box:
Expand All @@ -15,7 +15,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter_lints: ^3.0.0

flutter:
uses-material-design: true

0 comments on commit 9e70a8c

Please sign in to comment.