Skip to content

Commit

Permalink
deps: Update example app android dependencies (#212)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
thelukewalton and github-actions authored Nov 14, 2024
1 parent aa7a1e4 commit 179c2cb
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 46 deletions.
10 changes: 5 additions & 5 deletions example/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49"
revision: "603104015dd692ea3403755b55d07813d5cf8965"
channel: "stable"

project_type: app
Expand All @@ -13,11 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965
- platform: android
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965

# User provided section

Expand Down
2 changes: 1 addition & 1 deletion example/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gradle-wrapper.jar
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks
34 changes: 10 additions & 24 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,29 @@ plugins {
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file("local.properties")
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader("UTF-8") { reader ->
localProperties.load(reader)
}
}

def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
if (flutterVersionCode == null) {
flutterVersionCode = "1"
}

def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) {
flutterVersionName = "1.0"
}

android {
namespace = "com.zebra.zeta.example"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
ndkVersion = "25.1.8937393"

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.zebra.zeta.example"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName
versionCode = flutter.versionCode
versionName = flutter.versionName
}

buildTypes {
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
4 changes: 2 additions & 2 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
id "com.android.application" version "8.3.1" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}

include ":app"
10 changes: 5 additions & 5 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PODS:
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqflite (0.0.3):
- sqflite_darwin (0.0.4):
- Flutter
- FlutterMacOS
- url_launcher_ios (0.0.1):
Expand All @@ -16,7 +16,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)

EXTERNAL SOURCES:
Expand All @@ -26,16 +26,16 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite:
:path: ".symlinks/plugins/sqflite/darwin"
sqflite_darwin:
:path: ".symlinks/plugins/sqflite_darwin/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
sqflite_darwin: a553b1fd6fe66f53bbb0fe5b4f5bab93f08d7a13
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe

PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
16 changes: 10 additions & 6 deletions lib/src/components/navigation bar/navigation_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class ZetaNavigationBar extends ZetaStatelessWidget {
this.action,
this.semanticLabel,
this.shrinkItems = false,
this.useSafeArea = true,
}) : assert(
items.length >= 2 && items.length <= 6,
'The number of items should be between 2 and 6',
Expand All @@ -58,6 +59,7 @@ class ZetaNavigationBar extends ZetaStatelessWidget {
this.dividerIndex,
this.semanticLabel,
this.shrinkItems = false,
this.useSafeArea = true,
}) : splitItems = false,
action = null;

Expand All @@ -71,6 +73,7 @@ class ZetaNavigationBar extends ZetaStatelessWidget {
this.onTap,
this.dividerIndex,
this.semanticLabel,
this.useSafeArea = true,
}) : splitItems = true,
action = null,
shrinkItems = true;
Expand All @@ -85,6 +88,7 @@ class ZetaNavigationBar extends ZetaStatelessWidget {
this.onTap,
this.semanticLabel,
this.shrinkItems = false,
this.useSafeArea = true,
}) : dividerIndex = null,
splitItems = false;

Expand Down Expand Up @@ -117,6 +121,9 @@ class ZetaNavigationBar extends ZetaStatelessWidget {
/// When set to false the items will take up equal space and will expand to fill the bar.
final bool shrinkItems;

/// Whether the child should be wrapped in a [SafeArea].
final bool useSafeArea;

Row _generateNavigationItemRow(List<ZetaNavigationBarItem> items, BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
Expand Down Expand Up @@ -184,11 +191,7 @@ class ZetaNavigationBar extends ZetaStatelessWidget {
color: colors.surfacePrimary,
border: Border(top: BorderSide(color: colors.borderSubtle)),
),
child: Semantics(
child: SafeArea(
child: child,
),
),
child: Semantics(child: useSafeArea ? SafeArea(child: child) : child),
);
}

Expand All @@ -202,7 +205,8 @@ class ZetaNavigationBar extends ZetaStatelessWidget {
..add(DiagnosticsProperty<bool>('splitItems', splitItems))
..add(IntProperty('dividerIndex', dividerIndex))
..add(StringProperty('semanticLabel', semanticLabel))
..add(DiagnosticsProperty<bool>('shrinkItems', shrinkItems));
..add(DiagnosticsProperty<bool>('shrinkItems', shrinkItems))
..add(DiagnosticsProperty<bool>('useSafeArea', useSafeArea));
}
}

Expand Down

0 comments on commit 179c2cb

Please sign in to comment.