Skip to content

Commit

Permalink
refactor: upgrade example to Flutter 3.0.0 (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel authored May 11, 2022
1 parent 9d728b9 commit ea47804
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 12 deletions.
5 changes: 4 additions & 1 deletion example/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ linter:
- iterable_contains_unrelated_type
- library_names
- library_prefixes
- list_remove_unrelated_type
- lines_longer_than_80_chars
- list_remove_unrelated_type
- no_adjacent_strings_in_list
- no_duplicate_case_values
- non_constant_identifier_names
Expand Down Expand Up @@ -75,5 +75,8 @@ linter:
- unnecessary_statements
- unnecessary_this
- unrelated_type_equality_checks
- use_colored_box
- use_enums
- use_rethrow_when_possible
- use_super_parameters
- valid_regexps
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion example/lib/authentication_flow/authentication_flow.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
}

class OnboardingStep extends StatelessWidget {
const OnboardingStep({Key? key, required this.step}) : super(key: key);
const OnboardingStep({super.key, required this.step});

static Page page(int step) {
return MaterialPage<void>(child: OnboardingStep(step: step));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'city_selection_cubit.dart';

class CitySelection extends StatelessWidget {
const CitySelection({Key? key, required this.state}) : super(key: key);
const CitySelection({super.key, required this.state});

static MaterialPage<void> page({required String state}) {
return MaterialPage<void>(child: CitySelection(state: state));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'state_selection_cubit.dart';

class StateSelection extends StatelessWidget {
const StateSelection({Key? key, required this.country}) : super(key: key);
const StateSelection({super.key, required this.country});

static MaterialPage<void> page({required String country}) {
return MaterialPage<void>(child: StateSelection(country: country));
Expand Down
4 changes: 2 additions & 2 deletions example/lib/location_flow/widgets/drop_down_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import 'package:flutter/material.dart';

class DropdownMenu extends StatelessWidget {
const DropdownMenu({
Key? key,
super.key,
required this.items,
required this.onChanged,
this.value,
this.hint,
}) : super(key: key);
});

final Widget? hint;
final List<String> items;
Expand Down
5 changes: 2 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
void main() => runApp(MyApp(locationRepository: LocationRepository()));

class MyApp extends StatelessWidget {
MyApp({Key? key, required LocationRepository locationRepository})
: _locationRepository = locationRepository,
super(key: key);
MyApp({super.key, required LocationRepository locationRepository})
: _locationRepository = locationRepository;

final LocationRepository _locationRepository;

Expand Down
2 changes: 1 addition & 1 deletion example/lib/onboarding_flow/onboarding_flow.dart
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class OnboardingComplete extends StatelessWidget {
}

class MyPage<T> extends Page<T> {
const MyPage({required this.child, LocalKey? key}) : super(key: key);
const MyPage({required this.child, super.key});

final Widget child;

Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ version: 1.0.0+1
publish_to: none

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.17.0 <3.0.0"

dependencies:
flutter:
sdk: flutter
equatable: ^2.0.0
flutter_bloc: ^7.0.0
flutter_bloc: ^8.0.0
flow_builder:
path: ../

Expand Down

0 comments on commit ea47804

Please sign in to comment.