Skip to content

Commit

Permalink
Merge pull request #6 from mirmoktadir/animation
Browse files Browse the repository at this point in the history
Tween Animation
  • Loading branch information
mirmoktadir authored Sep 27, 2023
2 parents 4733726 + 008bd7f commit 109e5cc
Show file tree
Hide file tree
Showing 35 changed files with 4,695 additions and 374 deletions.
2,075 changes: 2,074 additions & 1 deletion animations/apiError.json

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
platform :ios, '13.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -40,5 +40,11 @@ end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
end
end
84 changes: 44 additions & 40 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ PODS:
- BoringSSL-GRPC/Implementation (0.0.24):
- BoringSSL-GRPC/Interface (= 0.0.24)
- BoringSSL-GRPC/Interface (0.0.24)
- cloud_firestore (4.9.1):
- Firebase/Firestore (= 10.12.0)
- cloud_firestore (4.9.2):
- Firebase/Firestore (= 10.15.0)
- firebase_core
- Flutter
- nanopb (< 2.30910.0, >= 2.30908.0)
Expand Down Expand Up @@ -678,42 +678,43 @@ PODS:
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
- Firebase/Auth (10.12.0):
- Firebase/Auth (10.15.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 10.12.0)
- Firebase/CoreOnly (10.12.0):
- FirebaseCore (= 10.12.0)
- Firebase/Firestore (10.12.0):
- FirebaseAuth (~> 10.15.0)
- Firebase/CoreOnly (10.15.0):
- FirebaseCore (= 10.15.0)
- Firebase/Firestore (10.15.0):
- Firebase/CoreOnly
- FirebaseFirestore (~> 10.12.0)
- Firebase/Messaging (10.12.0):
- FirebaseFirestore (~> 10.15.0)
- Firebase/Messaging (10.15.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 10.12.0)
- firebase_auth (4.9.0):
- Firebase/Auth (= 10.12.0)
- FirebaseMessaging (~> 10.15.0)
- firebase_auth (4.10.0):
- Firebase/Auth (= 10.15.0)
- firebase_core
- Flutter
- firebase_core (2.15.1):
- Firebase/CoreOnly (= 10.12.0)
- firebase_core (2.16.0):
- Firebase/CoreOnly (= 10.15.0)
- Flutter
- firebase_messaging (14.6.7):
- Firebase/Messaging (= 10.12.0)
- firebase_messaging (14.6.8):
- Firebase/Messaging (= 10.15.0)
- firebase_core
- Flutter
- FirebaseAppCheckInterop (10.13.0)
- FirebaseAuth (10.12.0):
- FirebaseAppCheckInterop (10.15.0)
- FirebaseAuth (10.15.0):
- FirebaseAppCheckInterop (~> 10.0)
- FirebaseCore (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/Environment (~> 7.8)
- GTMSessionFetcher/Core (< 4.0, >= 2.1)
- FirebaseCore (10.12.0):
- RecaptchaInterop (~> 100.0)
- FirebaseCore (10.15.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Logger (~> 7.8)
- FirebaseCoreInternal (10.13.0):
- FirebaseCoreInternal (10.15.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseFirestore (10.12.0):
- FirebaseFirestore (10.15.0):
- abseil/algorithm (~> 1.20220623.0)
- abseil/base (~> 1.20220623.0)
- abseil/container/flat_hash_map (~> 1.20220623.0)
Expand All @@ -726,12 +727,12 @@ PODS:
- "gRPC-C++ (~> 1.50.1)"
- leveldb-library (~> 1.22)
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseInstallations (10.13.0):
- FirebaseInstallations (10.15.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- PromisesObjC (~> 2.1)
- FirebaseMessaging (10.12.0):
- FirebaseMessaging (10.15.0):
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleDataTransport (~> 9.2)
Expand Down Expand Up @@ -847,9 +848,10 @@ PODS:
- FlutterMacOS
- PromisesObjC (2.3.1)
- ReachabilitySwift (5.0.0)
- SDWebImage (5.17.0):
- SDWebImage/Core (= 5.17.0)
- SDWebImage/Core (5.17.0)
- RecaptchaInterop (100.0.0)
- SDWebImage (5.18.2):
- SDWebImage/Core (= 5.18.2)
- SDWebImage/Core (5.18.2)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
Expand Down Expand Up @@ -900,6 +902,7 @@ SPEC REPOS:
- nanopb
- PromisesObjC
- ReachabilitySwift
- RecaptchaInterop
- SDWebImage
- SwiftyGif
- TOCropViewController
Expand Down Expand Up @@ -939,23 +942,23 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
abseil: 926fb7a82dc6d2b8e1f2ed7f3a718bce691d1e46
BoringSSL-GRPC: 3175b25143e648463a56daeaaa499c6cb86dad33
cloud_firestore: 85d66b543b25130c45258412a39e851e230186e7
cloud_firestore: ac000d8c5a79d57dc69238ea06bb422880fb825e
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
Firebase: 07150e75d142fb9399f6777fa56a187b17f833a0
firebase_auth: 097a2440d40bed75f4dfe4cb91b4d98349509b47
firebase_core: 4a3246a02f828a01c74a2c26427037786d90f17f
firebase_messaging: 0b4f7997f491343b90d9300af54fe55c72135833
FirebaseAppCheckInterop: 5e12dc623d443dedffcde9c6f3ed41510125d8ef
FirebaseAuth: a66c1e14ec58f41d154a4b41ce1a23ea00ad4805
FirebaseCore: f86a1394906b97ac445ae49c92552a9425831bed
FirebaseCoreInternal: b342e37cd4f5b4454ec34308f073420e7920858e
FirebaseFirestore: f94c9541515fa4a49af52269bbc50349009424b4
FirebaseInstallations: b28af1b9f997f1a799efe818c94695a3728c352f
FirebaseMessaging: bb2c4f6422a753038fe137d90ae7c1af57251316
Firebase: 66043bd4579e5b73811f96829c694c7af8d67435
firebase_auth: ca31bca59224dc727ea0df7f066f30158a8acc3b
firebase_core: 77172d0a9d8d19d07606e24406e4c2fc14d3265b
firebase_messaging: 6aff54d420b7ce7080c26dd131b08bc632666852
FirebaseAppCheckInterop: a8c555b1c2db1d9445e6c3a08a848167ddb7eb51
FirebaseAuth: a55ec5f7f8a5b1c2dd750235c1bb419bfb642445
FirebaseCore: 2cec518b43635f96afe7ac3a9c513e47558abd2e
FirebaseCoreInternal: 2f4bee5ed00301b5e56da0849268797a2dd31fb4
FirebaseFirestore: b4c0eaaf24efda5732ec21d9e6c788d083118ca6
FirebaseInstallations: cae95cab0f965ce05b805189de1d4c70b11c76fb
FirebaseMessaging: 0c0ae1eb722ef0c07f7801e5ded8dccd1357d6d4
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
Expand All @@ -972,12 +975,13 @@ SPEC CHECKSUMS:
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
SDWebImage: c0de394d7cf7f9838aed1fd6bb6037654a4572e4
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863

PODFILE CHECKSUM: fff3348f19d060f45045a9c9fbca3a264147c2f7
PODFILE CHECKSUM: 31828bab3e9d729b44fbc0ec3dfe1a185a87bd4b

COCOAPODS: 1.12.1
4 changes: 2 additions & 2 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>GetX Standard</string>
<string>GetX Standard</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>GetX Standard</string>
<string>GetX Standard</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
Expand Down
4 changes: 2 additions & 2 deletions lib/app/components/global-widgets/custom_snackbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class CustomSnackBar {
onTap: (snack) {
Get.closeAllSnackbars();
},
//overlayBlur: 0.8,
overlayBlur: 0.8,
message: message,
);
}
Expand All @@ -68,7 +68,7 @@ class CustomSnackBar {
onTap: (snack) {
Get.closeAllSnackbars();
},
// overlayBlur: 0.8,
overlayBlur: 0.8,
message: message,
);
}
Expand Down
58 changes: 58 additions & 0 deletions lib/app/components/global-widgets/network_image_box.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:lottie/lottie.dart';

import '../../../utils/constants.dart';

class NetworkImageBox extends StatelessWidget {
const NetworkImageBox({
super.key,
required this.url,
required this.radius,
});

final String url;
final num radius;

@override
Widget build(BuildContext context) {
return CachedNetworkImage(
height: 110.sp,
width: 110.sp,
imageUrl: url,
imageBuilder: (context, imageProvider) => Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.white, width: 1),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(radius.r),
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover,
),
),
),
placeholder: (context, url) => Lottie.asset(
'animations/image_loader.json',
height: 120.sp,
repeat: true,
reverse: true,
fit: BoxFit.cover,
),
errorWidget: (context, url, error) => Container(
height: 300.sp,
width: 300.sp,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: const Color(0xffF3F3F3),
border: Border.all(color: Colors.white, width: 1),
shape: BoxShape.circle,
),
child: Image.asset(
AppImages.kNoImage,
fit: BoxFit.contain,
),
),
);
}
}
1 change: 1 addition & 0 deletions lib/app/components/global-widgets/splash_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class SplashContainer extends StatelessWidget {
splashFactory: InkSplash.splashFactory,
highlightColor: theme.primaryColor.withOpacity(.3),
borderRadius: BorderRadius.circular(radius.r),
radius: 60.r,
onTap: onPressed,
child: Ink(
decoration: BoxDecoration(
Expand Down
27 changes: 27 additions & 0 deletions lib/app/data/local/hive/hive_adapters.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import '../../../modules/example/home-with-restAPI/model/recipes_model.dart';
import 'my_hive.dart';

class HiveAdapters {
static Future<void> registerAll() async {
await MyHive.init(registerAdapters: (hive) {
hive.registerAdapter(RecipesAdapter());
hive.registerAdapter(ResultsAdapter());
hive.registerAdapter(TotalTimeTierAdapter());
hive.registerAdapter(ShowAdapter());
hive.registerAdapter(SectionsAdapter());
hive.registerAdapter(ComponentsAdapter());
hive.registerAdapter(MeasurementsAdapter());
hive.registerAdapter(UnitAdapter());
hive.registerAdapter(IngredientAdapter());
hive.registerAdapter(CompilationsAdapter());
hive.registerAdapter(TagsAdapter());
hive.registerAdapter(RenditionsAdapter());
hive.registerAdapter(NutritionAdapter());
hive.registerAdapter(PriceAdapter());
hive.registerAdapter(TopicsAdapter());
hive.registerAdapter(UserRatingsAdapter());
hive.registerAdapter(InstructionsAdapter());
hive.registerAdapter(CreditsAdapter());
});
}
}
50 changes: 50 additions & 0 deletions lib/app/data/local/hive/my_hive.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import 'package:getx_standard/app/modules/example/home-with-restAPI/model/recipes_model.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:logger/logger.dart';

class MyHive {
// Prevent making an instance of this class
MyHive._();

// Hive box to store recipe data
static late Box<Results> _recipeBox;

// Box name, it's like the table name

static const String _recipeBoxName = 'recipes';

/// Initialize local db (HIVE)
/// Pass testPath only if you are testing hive
static Future<void> init(
{Function(HiveInterface)? registerAdapters, String? testPath}) async {
if (testPath != null) {
Hive.init(testPath);
} else {
await Hive.initFlutter();
}
await registerAdapters?.call(Hive);

await initRecipesBox();
}

/// Initialize recipe box
static Future<void> initRecipesBox() async {
_recipeBox = await Hive.openBox<Results>(_recipeBoxName);
}

/// Save all recipes to the database
static Future<void> saveAllRecipes(List<Results> recipes) async {
try {
await _recipeBox.clear();
await _recipeBox.addAll(recipes);
} catch (error) {
Logger().e("$error");
}
}

/// Get all recipes from Hive
static List<Results> getAllRecipes() {
final recipes = _recipeBox.values.toList();
return recipes.cast<Results>();
}
}
Loading

0 comments on commit 109e5cc

Please sign in to comment.