Skip to content

Commit

Permalink
Merge pull request #25 from MostafaSolimanMO/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
MostafaSolimanMO authored Nov 7, 2023
2 parents a87485b + af6febe commit 4e83f1c
Show file tree
Hide file tree
Showing 18 changed files with 154 additions and 538 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@
.dart_tool/
.packages
build/
.flutter-plugins
.flutter-plugins-dependencies
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

- Feat: Added [runOnEveryNewBuild](https://github.com/MostafaSolimanMO/once/pull/23) Function
- Fix: `runOnNewVersion` saves version numbers with non-numerical values and does not sanitize them upon retrieval [Issue #24](https://github.com/MostafaSolimanMO/once/issues/24)
- Fix: Types Error in `runner.dart`
- Chore: Update dependencies & example app

# 1.5.4

- fix: [Issue #20](https://github.com/MostafaSolimanMO/once/issues/20)
Expand Down
1 change: 1 addition & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
.pub-cache/
.pub/
/build/
pubspec.lock

# Web related
lib/generated_plugin_registrant.dart
Expand Down
3 changes: 3 additions & 0 deletions example/ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ Runner/GeneratedPluginRegistrant.*
!default.mode2v3
!default.pbxuser
!default.perspectivev3

# Podlock files
Podfile.lock
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion example/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, '9.0'
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
28 changes: 0 additions & 28 deletions example/ios/Podfile.lock

This file was deleted.

13 changes: 8 additions & 5 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -156,7 +156,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -200,10 +200,12 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down Expand Up @@ -236,6 +238,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -340,7 +343,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -418,7 +421,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -467,7 +470,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 4 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
31 changes: 19 additions & 12 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class _MyAppState extends State<MyApp> {
}

void set(String newOnce) => setState(
() => currentValue = newOnce + ' ${Random().nextInt(100)}',
() => currentValue = '$newOnce ${Random().nextInt(100)}',
);

@override
Expand All @@ -47,7 +47,7 @@ class _MyAppState extends State<MyApp> {
),
home: Scaffold(
appBar: AppBar(
title: const Text('Once Made with ❤️'),
title: const Text('Free Palestine 🇵🇸'),
),
body: Center(
child: SingleChildScrollView(
Expand All @@ -56,8 +56,15 @@ class _MyAppState extends State<MyApp> {
children: [
OnceWidget.showOnEveryNewVersion(
key: 'newVersionInfoDialog',
builder: () => const Text('Hey, It new app version, Smile!'),
fallback: () => const Text('Welcome back'),
builder: () => const Text(
'Hey, It\'s a new app version, Smile!',
),
),
OnceWidget.showOnEveryNewBuild(
key: 'newBuildInfoDialog',
builder: () => const Text(
'Hey, It\'s a new app build, Smile!',
),
),
OnceWidget.showOnce(
'onceWidget',
Expand All @@ -79,45 +86,45 @@ class _MyAppState extends State<MyApp> {
child: const Text("Run Hourly"),
onPressed: () => Once.runHourly(
"Hourly",
callback: () => set("Hello Hourly"),
callback: () => set("Hello New Hour"),
),
),
ElevatedButton(
child: const Text("Run Every 12 Hour"),
onPressed: () => Once.runEvery12Hours(
"12 Hour",
callback: () => set("Hello 12 Hour"),
callback: () => set("Hello New 12 Hour"),
),
),
ElevatedButton(
child: const Text("Run Daily"),
onPressed: () => Once.runDaily(
"Daily",
callback: () => set("Hello Daily"),
callback: () => set("Hello New Daily"),
),
),
ElevatedButton(
child: const Text("Run On New Month"),
onPressed: () => Once.runOnNewMonth(
"New Month",
callback: () => set("Hello New Month"),
fallback: () => set("Hello New Month Fallback"),
fallback: () => set("Hello I am not new Month"),
),
),
ElevatedButton(
child: const Text("Run Monthly"),
onPressed: () => Once.runMonthly(
"Monthly x",
callback: () => set("Hello Monthly"),
fallback: () => set('Hello Monthly Fallback'),
fallback: () => set('Hello I am not Monthly'),
),
),
ElevatedButton(
child: const Text("Run Monthly Debug"),
onPressed: () => Once.runMonthly(
"Monthly debug",
callback: () => set("Hello Monthly"),
fallback: () => set('Hello Monthly Fallback'),
callback: () => set("Hello Monthly (Debug)"),
fallback: () => set('Hello I am not Monthly (Debug)'),
debugCallback: true,
),
),
Expand All @@ -126,7 +133,7 @@ class _MyAppState extends State<MyApp> {
onPressed: () => Once.runCustom(
"x",
duration: const Duration(seconds: 5),
callback: () => set("Hello Custom"),
callback: () => set("Hello New 5 Sec"),
),
),
const SizedBox(
Expand Down
Loading

0 comments on commit 4e83f1c

Please sign in to comment.