Skip to content

Commit

Permalink
chore: upgrade to flutter and very_good_analysis 3.0.0 (#32)
Browse files Browse the repository at this point in the history
* ci: upgrade flutter version to 3.0.0

* deps(cli): upgrade to flutter 3.0.0 and very_good_analysis 3.0.0

* deps(form_flow): upgrade to flutter 3.0.0 and very_good_analysis 3.0.0

* deps(launch_analytics): upgrade to flutter 3.0.0 and very_good_analysis 3.0.0

* deps(form_flow): upgrade missing packages

* deps(preference_navigation): upgrade to flutter 3.0.0 and very_good_analysis 3.0.0

* deps(profile_accounts): upgrade to flutter 3.0.0 and very_good_analysis 3.0.0

* deps(form_flow): upgrade flow_builder to 0.0.8
  • Loading branch information
marcossevilla authored May 15, 2022
1 parent b46a895 commit b5fcb4f
Show file tree
Hide file tree
Showing 69 changed files with 124 additions and 128 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.10.5'
flutter-version: '3.0.0'
channel: 'stable'

- name: Install Tools
Expand Down
2 changes: 1 addition & 1 deletion cli/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include: package:very_good_analysis/analysis_options.2.3.0.yaml
include: package:very_good_analysis/analysis_options.3.0.0.yaml

linter:
rules:
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/commands/rm/command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Future<void> run(List<String> args) async {
case FileSystemEntityType.notFound:
print('The element <$elementPath> does not exist');
break;
default:
case FileSystemEntityType.link:
throw UnsupportedError('Unsupported element type');
}
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions cli/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ description: A set of utility commands.
version: 0.1.0+1

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

dependencies:
path: ^1.8.0

dev_dependencies:
test: ^1.17.12
very_good_analysis: ^2.4.0
very_good_analysis: ^3.0.0
2 changes: 1 addition & 1 deletion examples/form_flow/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include: package:very_good_analysis/analysis_options.2.4.0.yaml
include: package:very_good_analysis/analysis_options.3.0.0.yaml
linter:
rules:
public_member_api_docs: false
12 changes: 8 additions & 4 deletions examples/form_flow/lib/app/view/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'package:form_flow/app/app.dart';
import 'package:form_flow/l10n/l10n.dart';

class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
const App({super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -25,15 +25,19 @@ class App extends StatelessWidget {
}

class AppView extends StatelessWidget {
const AppView({Key? key}) : super(key: key);
const AppView({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
appBarTheme: const AppBarTheme(color: Color(0xFF13B9FF)),
colorScheme: const ColorScheme.light(secondary: Color(0xFF13B9FF)),
appBarTheme: const AppBarTheme(
color: Color(0xFF13B9FF),
),
colorScheme: const ColorScheme.light(
secondary: Color(0xFF13B9FF),
),
),
localizationsDelegates: const [
AppLocalizations.delegate,
Expand Down
9 changes: 6 additions & 3 deletions examples/form_flow/lib/profile/view/profile_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import 'package:profile/profile.dart';

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

static Page page(User user) {
return MaterialPage<void>(
Expand Down Expand Up @@ -36,7 +36,10 @@ class ProfilePage extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(user.email),
Text(
user.email,
style: const TextStyle(fontSize: 10),
),
Text(user.biography),
],
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:form_flow/signup/signup.dart';
import 'package:formz_inputs/formz_inputs.dart';

class BiographyPage extends StatelessWidget {
const BiographyPage({Key? key}) : super(key: key);
const BiographyPage({super.key});

static Page page() => const MaterialPage<void>(child: BiographyPage());

Expand All @@ -19,7 +19,7 @@ class BiographyPage extends StatelessWidget {
}

class BiographyView extends StatelessWidget {
const BiographyView({Key? key}) : super(key: key);
const BiographyView({super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -36,7 +36,7 @@ class BiographyView extends StatelessWidget {
}

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

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -70,7 +70,7 @@ class _BiographyInput extends StatelessWidget {
}

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

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:form_flow/signup/signup.dart';
import 'package:formz_inputs/formz_inputs.dart';

class CredentialsForm extends StatelessWidget {
const CredentialsForm({Key? key}) : super(key: key);
const CredentialsForm({super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -20,7 +20,7 @@ class CredentialsForm extends StatelessWidget {
}

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

@override
Widget build(BuildContext context) {
Expand All @@ -45,7 +45,7 @@ class _EmailInput extends StatelessWidget {
}

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

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:form_flow/signup/signup.dart';
import 'package:formz_inputs/formz_inputs.dart';

class CredentialsPage extends StatelessWidget {
const CredentialsPage({Key? key}) : super(key: key);
const CredentialsPage({super.key});

static Page page() => const MaterialPage<void>(child: CredentialsPage());

Expand All @@ -19,7 +19,7 @@ class CredentialsPage extends StatelessWidget {
}

class CredentialsView extends StatelessWidget {
const CredentialsView({Key? key}) : super(key: key);
const CredentialsView({super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -36,7 +36,7 @@ class CredentialsView extends StatelessWidget {
}

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

@override
Widget build(BuildContext context) {
Expand Down
8 changes: 4 additions & 4 deletions examples/form_flow/lib/signup/pin/view/pin_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:form_flow/signup/signup.dart';
import 'package:formz_inputs/formz_inputs.dart';

class PinPage extends StatelessWidget {
const PinPage({Key? key}) : super(key: key);
const PinPage({super.key});

static Page page() => const MaterialPage<void>(child: PinPage());

Expand All @@ -20,7 +20,7 @@ class PinPage extends StatelessWidget {
}

class PinView extends StatelessWidget {
const PinView({Key? key}) : super(key: key);
const PinView({super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -37,7 +37,7 @@ class PinView extends StatelessWidget {
}

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

@override
Widget build(BuildContext context) {
Expand All @@ -64,7 +64,7 @@ class _PinInput extends StatelessWidget {
}

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

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions examples/form_flow/lib/signup/view/signup_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:form_flow/app/app.dart';
import 'package:form_flow/signup/signup.dart';

class SignUpPage extends StatelessWidget {
const SignUpPage({Key? key}) : super(key: key);
const SignUpPage({super.key});

static Page page() => const MaterialPage<void>(child: SignUpPage());

Expand All @@ -19,7 +19,7 @@ class SignUpPage extends StatelessWidget {
}

class SignUpView extends StatelessWidget {
const SignUpView({Key? key}) : super(key: key);
const SignUpView({super.key});

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:very_good_analysis/analysis_options.2.4.0.yaml
include: package:very_good_analysis/analysis_options.3.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class BiographyFormInput extends FormzInput<String, BiographyValidationError> {
const BiographyFormInput.pure() : super.pure('');

/// {@macro Biography_form_input}
const BiographyFormInput.dirty([String value = '']) : super.dirty(value);
const BiographyFormInput.dirty([super.value = '']) : super.dirty();

@override
BiographyValidationError? validator(String value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class EmailFormInput extends FormzInput<String, EmailValidationError> {
const EmailFormInput.pure() : super.pure('');

/// {@macro email_form_input}
const EmailFormInput.dirty([String value = '']) : super.dirty(value);
const EmailFormInput.dirty([super.value = '']) : super.dirty();

static final RegExp _emailRegExp = RegExp(
r'^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$',
Expand Down
2 changes: 1 addition & 1 deletion examples/form_flow/packages/formz_inputs/lib/src/name.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class NameFormInput extends FormzInput<String, NameValidationError> {
const NameFormInput.pure() : super.pure('');

/// {@macro name_form_input}
const NameFormInput.dirty([String value = '']) : super.dirty(value);
const NameFormInput.dirty([super.value = '']) : super.dirty();

@override
NameValidationError? validator(String value) {
Expand Down
2 changes: 1 addition & 1 deletion examples/form_flow/packages/formz_inputs/lib/src/pin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PinFormInput extends FormzInput<String, PinValidationError> {
const PinFormInput.pure() : super.pure('');

/// {@macro pin_form_input}
const PinFormInput.dirty([String value = '']) : super.dirty(value);
const PinFormInput.dirty([super.value = '']) : super.dirty();

/// {@template max_length}
/// Maximum length the pin requires to be valid.
Expand Down
10 changes: 5 additions & 5 deletions examples/form_flow/packages/formz_inputs/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ version: 1.0.0+1
publish_to: none

environment:
sdk: ">=2.16.2 <3.0.0"

dependencies:
formz: ^0.4.0
sdk: ">=2.17.0 <3.0.0"
dependencies:
formz: ^0.4.1

dev_dependencies:
test: ^1.17.0
very_good_analysis: ^2.4.0
very_good_analysis: ^3.0.0
2 changes: 1 addition & 1 deletion examples/form_flow/packages/profile/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:very_good_analysis/analysis_options.2.4.0.yaml
include: package:very_good_analysis/analysis_options.3.0.0.yaml
4 changes: 2 additions & 2 deletions examples/form_flow/packages/profile/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ version: 1.0.0+1
publish_to: none

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

dependencies:
equatable: ^2.0.3

dev_dependencies:
test: ^1.17.12
very_good_analysis: ^2.4.0
very_good_analysis: ^3.0.0
Loading

0 comments on commit b5fcb4f

Please sign in to comment.