Skip to content

Commit

Permalink
Merge branch 'develop' into color_picker
Browse files Browse the repository at this point in the history
  • Loading branch information
bhav-khurana authored Jan 22, 2024
2 parents 492d8c1 + d18319e commit 98fe1e7
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 45 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build, Test and Analyze

on: [ push, pull_request ]
on: [push, pull_request]

jobs:
main:
Expand All @@ -13,24 +13,20 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: subosito/[email protected]
with:
flutter-version: '3.10.5'
channel: 'stable'
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
flutter-version: "3.10.5"
channel: "stable"
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
architecture: x64 # optional, x64 or arm64
- name: Setup
run: |
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
dart pub global activate protoc_plugin
chmod +x generate_protos.sh
./generate_protos.sh
make get
- name: Static Analysis
run: flutter analyze
run: make lint
- name: Unit Tests
run: flutter test test/unit
run: melos run test:unit
- name: Widget Tests
run: flutter test test/widget
run: melos run test:widget
- name: Build release package
run: flutter build apk --release
- name: Archive build artifacts
Expand All @@ -39,4 +35,3 @@ jobs:
name: apk
path: |
build/app/outputs/flutter-apk/app-release.apk
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: run pods-clean get clean build languages lint format test watch

FLUTTER := flutter
DART := dart
FLUTTER := fvm flutter
DART := fvm dart

run:
$(FLUTTER) run
Expand Down
2 changes: 1 addition & 1 deletion melos.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Paintroid-Flutter
repository: https://github.com/Catrobat/Paintroid-Flutter
sdkPath: auto
sdkPath: .fvm/flutter_sdk

packages:
- packages/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ class LineToAction extends PathAction {

class CloseAction extends PathAction {
const CloseAction();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class BottomNavBar extends StatelessWidget {
),
);
}

if (index == 2) {
showModalBottomSheet(
context: context,
Expand Down
33 changes: 17 additions & 16 deletions packages/l10n/lib/src/l10n/app_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,17 @@ import 'app_localizations_en.dart';
/// be consistent with the languages listed in the AppLocalizations.supportedLocales
/// property.
abstract class AppLocalizations {
AppLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString());
AppLocalizations(String locale)
: localeName = intl.Intl.canonicalizedLocale(locale.toString());

final String localeName;

static AppLocalizations of(BuildContext context) {
return Localizations.of<AppLocalizations>(context, AppLocalizations)!;
}

static const LocalizationsDelegate<AppLocalizations> delegate = _AppLocalizationsDelegate();
static const LocalizationsDelegate<AppLocalizations> delegate =
_AppLocalizationsDelegate();

/// A list of this localizations delegate along with the default localizations
/// delegates.
Expand All @@ -79,17 +81,16 @@ abstract class AppLocalizations {
/// Additional delegates can be added by appending to this list in
/// MaterialApp. This list does not have to be used at all if a custom list
/// of delegates is preferred or required.
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
<LocalizationsDelegate<dynamic>>[
delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
];

/// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[
Locale('en')
];
static const List<Locale> supportedLocales = <Locale>[Locale('en')];

/// No description provided for @fullscreen.
///
Expand Down Expand Up @@ -146,7 +147,8 @@ abstract class AppLocalizations {
String get layers;
}

class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
class _AppLocalizationsDelegate
extends LocalizationsDelegate<AppLocalizations> {
const _AppLocalizationsDelegate();

@override
Expand All @@ -155,24 +157,23 @@ class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations>
}

@override
bool isSupported(Locale locale) => <String>['en'].contains(locale.languageCode);
bool isSupported(Locale locale) =>
<String>['en'].contains(locale.languageCode);

@override
bool shouldReload(_AppLocalizationsDelegate old) => false;
}

AppLocalizations lookupAppLocalizations(Locale locale) {


// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'en': return AppLocalizationsEn();
case 'en':
return AppLocalizationsEn();
}

throw FlutterError(
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.'
);
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.');
}
34 changes: 24 additions & 10 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,28 @@ packages:
relative: true
source: path
version: "0.0.1"
conventional_commit:
dependency: transitive
description:
name: conventional_commit
sha256: dec15ad1118f029c618651a4359eb9135d8b88f761aa24e4016d061cd45948f2
url: "https://pub.dev"
source: hosted
version: "1.17.1"
command:
dependency: "direct main"
description:
path: "packages/command"
relative: true
source: path
version: "0.0.1"
component_library:
dependency: "direct main"
description:
path: "packages/component_library"
relative: true
source: path
version: "0.0.1"
conventional_commit:
dependency: transitive
description:
Expand Down Expand Up @@ -748,7 +770,7 @@ packages:
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
source: hosted
version: "0.5.0"
version: "0.2.0"
melos:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1456,14 +1478,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.0"
web:
dependency: transitive
description:
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.3.0"
web_socket_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -1536,5 +1550,5 @@ packages:
source: hosted
version: "2.1.1"
sdks:
dart: ">=3.2.0-194.0.dev <4.0.0"
dart: ">=3.0.5 <4.0.0"
flutter: ">=3.10.0"

0 comments on commit 98fe1e7

Please sign in to comment.