Skip to content

Commit

Permalink
1.6.0 feat: bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
MahanRahmati committed Jul 11, 2023
1 parent 86be75e commit 3e8c9d0
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 130 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.6.0

- Remove easy_localization
- Update AppCachedNetworkImage
- Update Dimens
- Bump dependencies

## 1.5.0

- Bump environment
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ This boilerplate includes several common dependencies that you may find useful w
| [flutter_native_splash](https://pub.dev/packages/flutter_native_splash/) | Native splash screen |
| [arna_web_service](https://pub.dev/packages/arna_web_service) | Web service |
| [arna_response_validation](https://pub.dev/packages/arna_response_validation) | Response validator |
| [easy_localization](https://pub.dev/packages/easy_localization) | Localization |

You can add or remove dependencies as needed for your specific use case.

Expand All @@ -56,7 +55,7 @@ To create splash, execute the following command: `dart run flutter_native_splash

## TODO

- Nothing for now!
- [ ] Localization

## License

Expand Down
11 changes: 1 addition & 10 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:async' show runZonedGuarded;

import 'package:arna_logger/arna_logger.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';

import '/src/app.dart';
Expand All @@ -13,18 +12,10 @@ Future<void> main() async {
return runZonedGuarded(() async {
final WidgetsBinding widgetsBinding =
WidgetsFlutterBinding.ensureInitialized();
await EasyLocalization.ensureInitialized();
await NativeSplash.instance.init(widgetsBinding);
Orientations.setPreferredOrientations();
await HiveStorage.instance.init();
runApp(
EasyLocalization(
supportedLocales: const <Locale>[Locale('en', 'US')],
path: 'assets/translations',
fallbackLocale: const Locale('en', 'US'),
child: const App(),
),
);
runApp(const App());
}, (final Object error, final StackTrace stack) {
arnaLogger(title: 'Run Stack', data: stack);
arnaLogger(title: 'Run Error', data: error);
Expand Down
4 changes: 0 additions & 4 deletions lib/src/app.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

Expand Down Expand Up @@ -27,9 +26,6 @@ class App extends StatelessWidget {
theme: AppTheme.lightTheme,
darkTheme: AppTheme.darkTheme,
themeMode: themeModeProvider.selectedThemeMode,
localizationsDelegates: context.localizationDelegates,
supportedLocales: context.supportedLocales,
locale: context.locale,
routerConfig: Routes.router,
);
},
Expand Down
6 changes: 4 additions & 2 deletions lib/src/constants/dimens.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
class Dimens {
Dimens._();

static const double horizontalPadding = 8.0;
static const double verticalPadding = 8.0;
static const double base = 8.0;
static const double padding = base;
static const double largePadding = base * 2;
static const double borderRadius = base * 2;
}
13 changes: 10 additions & 3 deletions lib/src/widgets/cached_network_image.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';

import '/src/constants/dimens.dart';

class AppCachedNetworkImage extends StatelessWidget {
const AppCachedNetworkImage({
super.key,
Expand All @@ -9,18 +11,20 @@ class AppCachedNetworkImage extends StatelessWidget {
this.borderRadius,
this.width,
this.height,
this.progressIndicatorSize,
});

final String imageUrl;
final BoxFit fit;
final BorderRadius? borderRadius;
final double? width;
final double? height;
final double? progressIndicatorSize;

@override
Widget build(final BuildContext context) {
return ClipRRect(
borderRadius: borderRadius ?? BorderRadius.circular(8),
borderRadius: borderRadius ?? BorderRadius.circular(Dimens.borderRadius),
child: CachedNetworkImage(
imageUrl: imageUrl,
width: width,
Expand All @@ -32,8 +36,11 @@ class AppCachedNetworkImage extends StatelessWidget {
final DownloadProgress downloadProgress,
) {
return Center(
child: CircularProgressIndicator(
value: downloadProgress.progress,
child: SizedBox.square(
dimension: progressIndicatorSize,
child: CircularProgressIndicator(
value: downloadProgress.progress,
),
),
);
},
Expand Down
127 changes: 25 additions & 102 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ packages:
dependency: "direct main"
description:
name: arna_response_validation
sha256: "255aa101c707a46bbd2abea56d7a564be035707e6cefdc916d1ac3073bc860c0"
sha256: "15438baffaa4e576baef0c8133aa4741ce098d69a7f398f36f414d488ddad082"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.0"
arna_web_service:
dependency: "direct main"
description:
name: arna_web_service
sha256: "23f08c7fdceaf2e573c68c02fddec3bd55906df6aad2907c5d480b9f0ab484f8"
sha256: "0167c756ce085c28acc121083d9920f198824bb70564c1fb8866500328d3a703"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.4.0"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -257,22 +257,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.7.8"
easy_localization:
dependency: "direct main"
description:
name: easy_localization
sha256: "30ebf25448ffe169e0bd9bc4b5da94faa8398967a2ad2ca09f438be8b6953645"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
easy_logger:
dependency: transitive
description:
name: easy_logger
sha256: c764a6e024846f33405a2342caf91c62e357c24b02c04dbc712ef232bf30ffb7
url: "https://pub.dev"
source: hosted
version: "0.0.2"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -322,10 +306,10 @@ packages:
dependency: transitive
description:
name: flutter_cache_manager
sha256: "32cd900555219333326a2d0653aaaf8671264c29befa65bbd9856d204a4c9fb3"
sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba"
url: "https://pub.dev"
source: hosted
version: "3.3.0"
version: "3.3.1"
flutter_lints:
dependency: "direct dev"
description:
Expand All @@ -334,11 +318,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.2"
flutter_localizations:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
flutter_native_splash:
dependency: "direct main"
description:
Expand Down Expand Up @@ -369,10 +348,10 @@ packages:
dependency: "direct dev"
description:
name: freezed
sha256: a9520490532087cf38bf3f7de478ab6ebeb5f68bb1eb2641546d92719b224445
sha256: "1abef0aa34d4e5b97c9b34f75f980091d718224496a854419710c1b5454021cc"
url: "https://pub.dev"
source: hosted
version: "2.3.5"
version: "2.4.0"
freezed_annotation:
dependency: "direct main"
description:
Expand Down Expand Up @@ -401,10 +380,10 @@ packages:
dependency: "direct main"
description:
name: go_router
sha256: "1531542666c2d052c44bbf6e2b48011bf3771da0404b94c60eabec1228a62906"
sha256: b33a88c67816312597e5e0f5906c5139a0b9bd9bb137346e872c788da7af8ea0
url: "https://pub.dev"
source: hosted
version: "9.0.0"
version: "9.0.3"
graphs:
dependency: transitive
description:
Expand Down Expand Up @@ -449,10 +428,10 @@ packages:
dependency: transitive
description:
name: http
sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2"
sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525"
url: "https://pub.dev"
source: hosted
version: "0.13.6"
version: "1.1.0"
http_multi_server:
dependency: transitive
description:
Expand Down Expand Up @@ -481,10 +460,10 @@ packages:
dependency: "direct main"
description:
name: intl
sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
url: "https://pub.dev"
source: hosted
version: "0.18.0"
version: "0.18.1"
io:
dependency: transitive
description:
Expand Down Expand Up @@ -661,14 +640,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.7"
pedantic:
dependency: transitive
description:
name: pedantic
sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602"
url: "https://pub.dev"
source: hosted
version: "1.11.1"
petitparser:
dependency: transitive
description:
Expand Down Expand Up @@ -753,66 +724,10 @@ packages:
dependency: "direct main"
description:
name: safe_change_notifier
sha256: e69034655ea33aa7dce3c5bb33cf12fc7c07a0ce7d59b7291fd030b70d059570
url: "https://pub.dev"
source: hosted
version: "0.2.0"
shared_preferences:
dependency: transitive
description:
name: shared_preferences
sha256: "0344316c947ffeb3a529eac929e1978fcd37c26be4e8468628bac399365a3ca1"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
sha256: fe8401ec5b6dcd739a0fe9588802069e608c3fdbfd3c3c93e546cf2f90438076
url: "https://pub.dev"
source: hosted
version: "2.2.0"
shared_preferences_foundation:
dependency: transitive
description:
name: shared_preferences_foundation
sha256: "0dc5c49ad8a05ed358b991b60c7b0ba1a14e16dae58af9b420d6b9e82dc024ab"
sha256: e9e7e9daef7e4d27a266cc569842ec2fcb9484fba0f0ea209801c480efe8452c
url: "https://pub.dev"
source: hosted
version: "2.3.0"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
sha256: "71d6806d1449b0a9d4e85e0c7a917771e672a3d5dc61149cc9fac871115018e1"
url: "https://pub.dev"
source: hosted
version: "2.3.0"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
sha256: "23b052f17a25b90ff2b61aad4cc962154da76fb62848a9ce088efe30d7c50ab1"
url: "https://pub.dev"
source: hosted
version: "2.3.0"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
sha256: "7347b194fb0bbeb4058e6a4e87ee70350b6b2b90f8ac5f8bd5b3a01548f6d33a"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
sha256: f95e6a43162bce43c9c3405f3eb6f39e5b5d11f65fab19196cf8225e2777624d
url: "https://pub.dev"
source: hosted
version: "2.3.0"
version: "0.3.0"
shelf:
dependency: transitive
description:
Expand Down Expand Up @@ -882,6 +797,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.11.0"
state_notifier:
dependency: transitive
description:
name: state_notifier
sha256: "8fe42610f179b843b12371e40db58c9444f8757f8b69d181c97e50787caed289"
url: "https://pub.dev"
source: hosted
version: "0.7.2+1"
stream_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -1044,4 +967,4 @@ packages:
version: "3.1.2"
sdks:
dart: ">=3.0.5 <4.0.0"
flutter: ">=3.7.0-0"
flutter: ">=3.10.0"
13 changes: 6 additions & 7 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,26 @@ dependencies:
sdk: flutter

arna_logger: ^1.0.7
go_router: ^9.0.0
go_router: ^9.0.3
hive: ^2.2.3
hive_flutter: ^1.1.0
intl: ^0.18.0
intl: ^0.18.1
provider: ^6.0.5
safe_change_notifier: ^0.2.0
safe_change_notifier: ^0.3.0
flutter_svg: ^2.0.7
cached_network_image: ^3.2.3
freezed_annotation: ^2.2.0
json_annotation: ^4.8.1
flutter_native_splash: ^2.3.1
arna_web_service: ^1.3.0
arna_response_validation: ^1.2.0
easy_localization: ^3.0.2
arna_web_service: ^1.4.0
arna_response_validation: ^1.3.0

dev_dependencies:
build_runner: ^2.4.6
flutter_lints: ^2.0.1
flutter_test:
sdk: flutter
freezed: ^2.3.5
freezed: ^2.4.0
hive_generator: ^2.0.0
json_serializable: ^6.7.1

Expand Down

0 comments on commit 3e8c9d0

Please sign in to comment.