Skip to content

Commit

Permalink
Modernize app
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Mar 12, 2024
1 parent a47147f commit aefcbf5
Show file tree
Hide file tree
Showing 42 changed files with 2,240 additions and 2,102 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,21 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
project: [api, app, tools]
projects: [app, api, tools]
defaults:
run:
working-directory: ${{ matrix.project }}
working-directory: ${{ matrix.projects }}
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v4
- name: Get flutter version
working-directory: ./
run: |
FLUTTER_VERSION=$(cat ./FLUTTER_VERSION)
FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
- uses: subosito/flutter-action@v2.12.0
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'any'
channel: 'master'
- uses: actions/checkout@v4
- name: Print Dart SDK version
run: |
Expand All @@ -39,8 +38,13 @@ jobs:
- name: Analyze project source
run: |
flutter analyze --fatal-infos
- name: Run build_runner
if: matrix.projects != 'tools'
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Test for git changes
run: git diff --exit-code
# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
# - name: Run tests
# run: flutter test
# run: flutter test
2 changes: 1 addition & 1 deletion FLUTTER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.16.5
3.19.3
1 change: 1 addition & 0 deletions api/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ include: package:lints/recommended.yaml
analyzer:
exclude:
- "**/*.g.dart"
- "**/*.freezed.dart"
46 changes: 23 additions & 23 deletions api/lib/models/cached.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part of 'cached.dart';
T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

CachedData _$CachedDataFromJson(Map<String, dynamic> json) {
return _CachedData.fromJson(json);
Expand Down Expand Up @@ -84,11 +84,11 @@ class _$CachedDataCopyWithImpl<$Res, $Val extends CachedData>
}

/// @nodoc
abstract class _$$_CachedDataCopyWith<$Res>
abstract class _$$CachedDataImplCopyWith<$Res>
implements $CachedDataCopyWith<$Res> {
factory _$$_CachedDataCopyWith(
_$_CachedData value, $Res Function(_$_CachedData) then) =
__$$_CachedDataCopyWithImpl<$Res>;
factory _$$CachedDataImplCopyWith(
_$CachedDataImpl value, $Res Function(_$CachedDataImpl) then) =
__$$CachedDataImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
Expand All @@ -99,11 +99,11 @@ abstract class _$$_CachedDataCopyWith<$Res>
}

/// @nodoc
class __$$_CachedDataCopyWithImpl<$Res>
extends _$CachedDataCopyWithImpl<$Res, _$_CachedData>
implements _$$_CachedDataCopyWith<$Res> {
__$$_CachedDataCopyWithImpl(
_$_CachedData _value, $Res Function(_$_CachedData) _then)
class __$$CachedDataImplCopyWithImpl<$Res>
extends _$CachedDataCopyWithImpl<$Res, _$CachedDataImpl>
implements _$$CachedDataImplCopyWith<$Res> {
__$$CachedDataImplCopyWithImpl(
_$CachedDataImpl _value, $Res Function(_$CachedDataImpl) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
Expand All @@ -114,7 +114,7 @@ class __$$_CachedDataCopyWithImpl<$Res>
Object? items = null,
Object? notes = null,
}) {
return _then(_$_CachedData(
return _then(_$CachedDataImpl(
lastUpdated: freezed == lastUpdated
? _value.lastUpdated
: lastUpdated // ignore: cast_nullable_to_non_nullable
Expand All @@ -137,8 +137,8 @@ class __$$_CachedDataCopyWithImpl<$Res>

/// @nodoc
@JsonSerializable()
class _$_CachedData extends _CachedData {
const _$_CachedData(
class _$CachedDataImpl extends _CachedData {
const _$CachedDataImpl(
{this.lastUpdated,
final List<Event> events = const [],
final List<CalendarItem> items = const [],
Expand All @@ -148,8 +148,8 @@ class _$_CachedData extends _CachedData {
_notes = notes,
super._();

factory _$_CachedData.fromJson(Map<String, dynamic> json) =>
_$$_CachedDataFromJson(json);
factory _$CachedDataImpl.fromJson(Map<String, dynamic> json) =>
_$$CachedDataImplFromJson(json);

@override
final DateTime? lastUpdated;
Expand Down Expand Up @@ -186,10 +186,10 @@ class _$_CachedData extends _CachedData {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_CachedData &&
other is _$CachedDataImpl &&
(identical(other.lastUpdated, lastUpdated) ||
other.lastUpdated == lastUpdated) &&
const DeepCollectionEquality().equals(other._events, _events) &&
Expand All @@ -209,12 +209,12 @@ class _$_CachedData extends _CachedData {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_CachedDataCopyWith<_$_CachedData> get copyWith =>
__$$_CachedDataCopyWithImpl<_$_CachedData>(this, _$identity);
_$$CachedDataImplCopyWith<_$CachedDataImpl> get copyWith =>
__$$CachedDataImplCopyWithImpl<_$CachedDataImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$_CachedDataToJson(
return _$$CachedDataImplToJson(
this,
);
}
Expand All @@ -225,11 +225,11 @@ abstract class _CachedData extends CachedData {
{final DateTime? lastUpdated,
final List<Event> events,
final List<CalendarItem> items,
final List<Note> notes}) = _$_CachedData;
final List<Note> notes}) = _$CachedDataImpl;
const _CachedData._() : super._();

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

@override
DateTime? get lastUpdated;
Expand All @@ -241,6 +241,6 @@ abstract class _CachedData extends CachedData {
List<Note> get notes;
@override
@JsonKey(ignore: true)
_$$_CachedDataCopyWith<_$_CachedData> get copyWith =>
_$$CachedDataImplCopyWith<_$CachedDataImpl> get copyWith =>
throw _privateConstructorUsedError;
}
6 changes: 3 additions & 3 deletions api/lib/models/cached.g.dart

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

Loading

0 comments on commit aefcbf5

Please sign in to comment.