Skip to content

Commit

Permalink
refactor: remove duplicated assets folder (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
nacho-alesina05 authored Nov 1, 2024
1 parent 445a758 commit 4945823
Show file tree
Hide file tree
Showing 31 changed files with 30 additions and 124 deletions.
Binary file removed assets/images/2.0x/Check.png
Binary file not shown.
Binary file removed assets/images/2.0x/Estrella.png
Binary file not shown.
Binary file removed assets/images/2.0x/Reloj.png
Binary file not shown.
Binary file removed assets/images/2.0x/background_green_prop.png
Binary file not shown.
Binary file removed assets/images/2.0x/background_red_prop.png
Binary file not shown.
Binary file removed assets/images/3.0x/Check.png
Binary file not shown.
Binary file removed assets/images/3.0x/Estrella.png
Binary file not shown.
Binary file removed assets/images/3.0x/Reloj.png
Binary file not shown.
Binary file removed assets/images/3.0x/background_green_prop.png
Binary file not shown.
Binary file removed assets/images/3.0x/background_red_prop.png
Binary file not shown.
Binary file removed assets/images/4.0x/Check.png
Binary file not shown.
Binary file removed assets/images/4.0x/Estrella.png
Binary file not shown.
Binary file removed assets/images/4.0x/Reloj.png
Binary file not shown.
Binary file removed assets/images/4.0x/background_green_prop.png
Binary file not shown.
Binary file removed assets/images/4.0x/background_red_prop.png
Binary file not shown.
Binary file removed assets/images/Check.png
Binary file not shown.
Binary file removed assets/images/Estrella.png
Binary file not shown.
Binary file removed assets/images/Reloj.png
Binary file not shown.
Binary file removed assets/images/background_green_prop.png
Binary file not shown.
Binary file removed assets/images/background_red_prop.png
Binary file not shown.
10 changes: 5 additions & 5 deletions design_system/lib/gen/assets.gen.dart

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

3 changes: 3 additions & 0 deletions design_system/lib/widgets/app_text_fields.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class AppTextField extends StatefulWidget {
final bool hasScreenBottomNavigation;
final int? currentLength;
final bool enableSuggestions;
final bool autocorrect;

const AppTextField({
required this.controller,
Expand All @@ -34,6 +35,7 @@ class AppTextField extends StatefulWidget {
this.suffixIcon,
this.onTrailingIconPress,
this.keyboardType,
this.autocorrect = false,
this.enabled = true,
this.obscureText = false,
this.maxLength,
Expand Down Expand Up @@ -73,6 +75,7 @@ class _AppTextFieldState extends State<AppTextField> {
maxLength: widget.maxLength,
minLines: widget.minLines,
maxLines: widget.maxLines,
autocorrect: widget.autocorrect,
cursorHeight: 24,
textAlignVertical: TextAlignVertical.center,
controller: widget.controller,
Expand Down
4 changes: 2 additions & 2 deletions design_system/lib/widgets/background.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ class ScreenBackgroundContainer extends StatelessWidget {
Positioned(
top: 0,
left: 0,
child: Assets.images.backgroundGreenProp.image(),
child: DsAssets.images.backgroundGreenProp.image(),
),
Positioned(
bottom: 0,
right: 0,
child: Assets.images.backgroundRedProp.image(),
child: DsAssets.images.backgroundRedProp.image(),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion design_system/lib/widgets/points_counter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class _PointsCounterState extends State<PointsCounter>
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Assets.images.estrella.image(),
DsAssets.images.estrella.image(),
const SizedBox(width: 8),
AnimatedCount(
count: widget.points,
Expand Down
6 changes: 3 additions & 3 deletions design_system/lib/widgets/summary_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class _Icon extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Assets.images.estrella.image(
DsAssets.images.estrella.image(
fit: BoxFit.fill,
filterQuality: FilterQuality.high,
),
Expand All @@ -131,7 +131,7 @@ class _Icon extends StatelessWidget {
InformationSummaryType.gestures => Row(
mainAxisSize: MainAxisSize.min,
children: [
Assets.images.check.image(
DsAssets.images.check.image(
fit: BoxFit.fill,
filterQuality: FilterQuality.high,
),
Expand All @@ -148,7 +148,7 @@ class _Icon extends StatelessWidget {
InformationSummaryType.time => Row(
mainAxisSize: MainAxisSize.min,
children: [
Assets.images.reloj.image(
DsAssets.images.reloj.image(
fit: BoxFit.fill,
filterQuality: FilterQuality.high,
),
Expand Down
6 changes: 6 additions & 0 deletions design_system/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ dev_dependencies:
build_runner: 2.4.6
lints: 3.0.0

flutter_gen:
assets:
outputs:
class_name: DsAssets
package_parameter_enabled: true

flutter:
generate: true
uses-material-design: true
Expand Down
8 changes: 4 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ PODS:
- BoringSSL-GRPC/Interface (0.0.36)
- camera_avfoundation (0.0.1):
- Flutter
- cloud_firestore (5.1.0):
- cloud_firestore (5.4.2):
- Firebase/Firestore (= 11.0.0)
- firebase_core
- Flutter
Expand All @@ -1182,7 +1182,7 @@ PODS:
- firebase_core (3.5.0):
- Firebase/CoreOnly (= 11.0.0)
- Flutter
- firebase_crashlytics (4.1.1):
- firebase_crashlytics (4.1.2):
- Firebase/Crashlytics (= 11.0.0)
- firebase_core
- Flutter
Expand Down Expand Up @@ -1552,11 +1552,11 @@ SPEC CHECKSUMS:
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
BoringSSL-GRPC: ca6a8e5d04812fce8ffd6437810c2d46f925eaeb
camera_avfoundation: 759172d1a77ae7be0de08fc104cfb79738b8a59e
cloud_firestore: 3f3395f245d7c0818519f94585b368224726b56b
cloud_firestore: efded0403c9e674954e2788d93bc2772a5089557
Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9
firebase_auth: f27287630c4d9e2c3c63e64d9240822ad6b07e5b
firebase_core: 2ec6b789859c7c24766344ec71fdf78639402d56
firebase_crashlytics: 4111f8198b78c99471c955af488cecd8224967e6
firebase_crashlytics: 60630a0f91ee432275fa1660fd8593079761448a
firebase_remote_config: 730cce6bb1c8c42708fc7dce9031a88026b8b87b
FirebaseABTesting: 2104d957ce33888a3d6f3bde298cdee376dde8f1
FirebaseAppCheckInterop: ea21450529cf0ebd132788dd8916a0269abc684f
Expand Down
105 changes: 0 additions & 105 deletions lib/gen/assets.gen.dart

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

4 changes: 2 additions & 2 deletions lib/ui/game_screen/game_screen.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'package:auto_route/auto_route.dart';
import 'package:design_system/design_system.dart';
import 'package:design_system/gen/assets.gen.dart';
import 'package:design_system/widgets/app_scaffold.dart';
import 'package:design_system/widgets/points_counter.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:simon_ai/gen/assets.gen.dart';
import 'package:simon_ai/ui/game_screen/gesture_feedback.dart';
import 'package:simon_ai/ui/game_screen/game_overlay.dart';
import 'package:simon_ai/ui/game_screen/game_screen_cubit.dart';
Expand Down Expand Up @@ -165,7 +165,7 @@ class _GesturesCounter extends StatelessWidget {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Assets.images.check.image(
DsAssets.images.check.image(
fit: BoxFit.fill,
filterQuality: FilterQuality.high,
),
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/leaderboard/leaderboard_screen.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import 'package:auto_route/auto_route.dart';
import 'package:design_system/design_system.dart';
import 'package:design_system/extensions/color_extensions.dart';
import 'package:design_system/gen/assets.gen.dart';
import 'package:design_system/widgets/app_button.dart';
import 'package:design_system/widgets/app_scaffold.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:simon_ai/gen/assets.gen.dart';
import 'package:simon_ai/ui/common/app_constrained_widget.dart';
import 'package:simon_ai/ui/extensions/context_device_extensions.dart';
import 'package:simon_ai/ui/leaderboard/leaderboard_cubit.dart';
Expand Down Expand Up @@ -233,7 +233,7 @@ class _LeaderboardUserCard extends StatelessWidget {
),
Row(
children: [
Assets.images.estrella.image(
DsAssets.images.estrella.image(
fit: BoxFit.fill,
filterQuality: FilterQuality.high,
width: 24,
Expand Down
2 changes: 2 additions & 0 deletions scripts/clean_up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ cd design_system/design_system_gallery && fvm flutter pub get && cd ../..

echo ':: dart run build_runner build --delete-conflicting-outputs ::'
fvm dart run build_runner build --delete-conflicting-outputs
cd design_system/design_system_gallery && fvm dart run build_runner build --delete-conflicting-outputs && cd ../..

0 comments on commit 4945823

Please sign in to comment.