Skip to content

Commit

Permalink
feat: upgrade flutter (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomokisun authored Dec 15, 2023
2 parents 9b5e70b + 8348a8e commit 48be086
Show file tree
Hide file tree
Showing 50 changed files with 1,180 additions and 1,552 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: ./.github/workflows/scripts/install-flutter.sh 3.3.8
- run: ./.github/workflows/scripts/install-flutter.sh 3.16.4
- run: ./.github/workflows/scripts/install-tools.sh
- run: flutter pub get
- run: flutter analyze
codegen:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: ./.github/workflows/scripts/install-flutter.sh 3.3.8
- run: ./.github/workflows/scripts/install-flutter.sh 3.16.4
- run: ./.github/workflows/scripts/install-tools.sh
- run: flutter pub get
- run: make generate
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
env:
FILE_FIREBASE_IOS_DEVELOPMENT: ${{ secrets.FILE_FIREBASE_IOS_DEVELOPMENT }}
FILE_FIREBASE_IOS_PRODUCTION: ${{ secrets.FILE_FIREBASE_IOS_PRODUCTION }}
- run: ./.github/workflows/scripts/install-flutter.sh 3.3.8
- run: ./.github/workflows/scripts/install-flutter.sh 3.16.4
- run: ./.github/workflows/scripts/install-tools.sh
- run: flutter pub get
- uses: actions/cache@v4
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion lib/analytics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:nererun/entity/off_timer_type.dart';
import 'package:nererun/entity/product.dart';
import 'package:nererun/entity/top_banner_setting.dart';

final firebaseAnalytics = FirebaseAnalytics();
final firebaseAnalytics = FirebaseAnalytics.instance;

class Analytics {
String screenName = '';
Expand Down
4 changes: 3 additions & 1 deletion lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ class App extends StatelessWidget {
home: const Root(),
theme: ThemeData(
primaryColor: AppColor.black,
backgroundColor: AppColor.black,
scaffoldBackgroundColor: AppColor.black,
fontFamily: FontFamily.notoSansJpRegular,
colorScheme: const ColorScheme.dark(
background: AppColor.black,
),
),
navigatorObservers: [
FirebaseAnalyticsObserver(analytics: firebaseAnalytics),
Expand Down
2 changes: 1 addition & 1 deletion lib/components/gradient_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ class GradientScaffold extends Scaffold {
appBar: appBar,
bottomNavigationBar: bottomNavigationBar,
body: Container(
child: body,
width: double.infinity,
height: double.infinity,
decoration: const BoxDecoration(
gradient: AppGradient.primary,
),
child: body,
),
);
}
114 changes: 58 additions & 56 deletions lib/entity/banner.freezed.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark

part of 'banner.dart';

Expand Down Expand Up @@ -33,84 +33,90 @@ mixin _$Banner {
/// @nodoc
abstract class $BannerCopyWith<$Res> {
factory $BannerCopyWith(Banner value, $Res Function(Banner) then) =
_$BannerCopyWithImpl<$Res>;
_$BannerCopyWithImpl<$Res, Banner>;
@useResult
$Res call({String title, int titleColor, String body, String url});
}

/// @nodoc
class _$BannerCopyWithImpl<$Res> implements $BannerCopyWith<$Res> {
class _$BannerCopyWithImpl<$Res, $Val extends Banner>
implements $BannerCopyWith<$Res> {
_$BannerCopyWithImpl(this._value, this._then);

final Banner _value;
// ignore: unused_field
final $Res Function(Banner) _then;
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;

@pragma('vm:prefer-inline')
@override
$Res call({
Object? title = freezed,
Object? titleColor = freezed,
Object? body = freezed,
Object? url = freezed,
Object? title = null,
Object? titleColor = null,
Object? body = null,
Object? url = null,
}) {
return _then(_value.copyWith(
title: title == freezed
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
titleColor: titleColor == freezed
titleColor: null == titleColor
? _value.titleColor
: titleColor // ignore: cast_nullable_to_non_nullable
as int,
body: body == freezed
body: null == body
? _value.body
: body // ignore: cast_nullable_to_non_nullable
as String,
url: url == freezed
url: null == url
? _value.url
: url // ignore: cast_nullable_to_non_nullable
as String,
));
) as $Val);
}
}

/// @nodoc
abstract class _$$_BannerCopyWith<$Res> implements $BannerCopyWith<$Res> {
factory _$$_BannerCopyWith(_$_Banner value, $Res Function(_$_Banner) then) =
__$$_BannerCopyWithImpl<$Res>;
abstract class _$$BannerImplCopyWith<$Res> implements $BannerCopyWith<$Res> {
factory _$$BannerImplCopyWith(
_$BannerImpl value, $Res Function(_$BannerImpl) then) =
__$$BannerImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String title, int titleColor, String body, String url});
}

/// @nodoc
class __$$_BannerCopyWithImpl<$Res> extends _$BannerCopyWithImpl<$Res>
implements _$$_BannerCopyWith<$Res> {
__$$_BannerCopyWithImpl(_$_Banner _value, $Res Function(_$_Banner) _then)
: super(_value, (v) => _then(v as _$_Banner));

@override
_$_Banner get _value => super._value as _$_Banner;
class __$$BannerImplCopyWithImpl<$Res>
extends _$BannerCopyWithImpl<$Res, _$BannerImpl>
implements _$$BannerImplCopyWith<$Res> {
__$$BannerImplCopyWithImpl(
_$BannerImpl _value, $Res Function(_$BannerImpl) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
@override
$Res call({
Object? title = freezed,
Object? titleColor = freezed,
Object? body = freezed,
Object? url = freezed,
Object? title = null,
Object? titleColor = null,
Object? body = null,
Object? url = null,
}) {
return _then(_$_Banner(
title: title == freezed
return _then(_$BannerImpl(
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
titleColor: titleColor == freezed
titleColor: null == titleColor
? _value.titleColor
: titleColor // ignore: cast_nullable_to_non_nullable
as int,
body: body == freezed
body: null == body
? _value.body
: body // ignore: cast_nullable_to_non_nullable
as String,
url: url == freezed
url: null == url
? _value.url
: url // ignore: cast_nullable_to_non_nullable
as String,
Expand All @@ -120,15 +126,15 @@ class __$$_BannerCopyWithImpl<$Res> extends _$BannerCopyWithImpl<$Res>

/// @nodoc
@JsonSerializable()
class _$_Banner with DiagnosticableTreeMixin implements _Banner {
const _$_Banner(
class _$BannerImpl with DiagnosticableTreeMixin implements _Banner {
const _$BannerImpl(
{required this.title,
required this.titleColor,
required this.body,
required this.url});

factory _$_Banner.fromJson(Map<String, dynamic> json) =>
_$$_BannerFromJson(json);
factory _$BannerImpl.fromJson(Map<String, dynamic> json) =>
_$$BannerImplFromJson(json);

@override
final String title;
Expand Down Expand Up @@ -156,34 +162,30 @@ class _$_Banner with DiagnosticableTreeMixin implements _Banner {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_Banner &&
const DeepCollectionEquality().equals(other.title, title) &&
const DeepCollectionEquality()
.equals(other.titleColor, titleColor) &&
const DeepCollectionEquality().equals(other.body, body) &&
const DeepCollectionEquality().equals(other.url, url));
other is _$BannerImpl &&
(identical(other.title, title) || other.title == title) &&
(identical(other.titleColor, titleColor) ||
other.titleColor == titleColor) &&
(identical(other.body, body) || other.body == body) &&
(identical(other.url, url) || other.url == url));
}

@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(title),
const DeepCollectionEquality().hash(titleColor),
const DeepCollectionEquality().hash(body),
const DeepCollectionEquality().hash(url));
int get hashCode => Object.hash(runtimeType, title, titleColor, body, url);

@JsonKey(ignore: true)
@override
_$$_BannerCopyWith<_$_Banner> get copyWith =>
__$$_BannerCopyWithImpl<_$_Banner>(this, _$identity);
@pragma('vm:prefer-inline')
_$$BannerImplCopyWith<_$BannerImpl> get copyWith =>
__$$BannerImplCopyWithImpl<_$BannerImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$_BannerToJson(
return _$$BannerImplToJson(
this,
);
}
Expand All @@ -194,9 +196,9 @@ abstract class _Banner implements Banner {
{required final String title,
required final int titleColor,
required final String body,
required final String url}) = _$_Banner;
required final String url}) = _$BannerImpl;

factory _Banner.fromJson(Map<String, dynamic> json) = _$_Banner.fromJson;
factory _Banner.fromJson(Map<String, dynamic> json) = _$BannerImpl.fromJson;

@override
String get title;
Expand All @@ -208,6 +210,6 @@ abstract class _Banner implements Banner {
String get url;
@override
@JsonKey(ignore: true)
_$$_BannerCopyWith<_$_Banner> get copyWith =>
_$$BannerImplCopyWith<_$BannerImpl> get copyWith =>
throw _privateConstructorUsedError;
}
5 changes: 3 additions & 2 deletions lib/entity/banner.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 48be086

Please sign in to comment.