Skip to content

Commit

Permalink
chore(update): updated repo to include updated dependencies, work wit…
Browse files Browse the repository at this point in the history
…h the current flutter version and did some overall cleanup
  • Loading branch information
Kounex committed Sep 30, 2024
1 parent 2d3c4c4 commit e5edb06
Show file tree
Hide file tree
Showing 165 changed files with 570 additions and 458 deletions.
4 changes: 2 additions & 2 deletions android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
arguments=--init-script /var/folders/9b/j0bnrfwd6r36z9l64wrjpxpw0000gn/T/d146c9752a26f79b52047fb6dc6ed385d064e120494f96f08ca63a317c41f94c.gradle --init-script /var/folders/9b/j0bnrfwd6r36z9l64wrjpxpw0000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
arguments=--init-script /var/folders/9b/j0bnrfwd6r36z9l64wrjpxpw0000gn/T/db3b08fc4a9ef609cb16b96b200fa13e563f396e9bb1ed0905fdab7bc3bc513b.gradle --init-script /var/folders/9b/j0bnrfwd6r36z9l64wrjpxpw0000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=/opt/homebrew/Cellar/openjdk/21.0.1/libexec/openjdk.jdk/Contents/Home
java.home=/opt/homebrew/Cellar/openjdk/22.0.2/libexec/openjdk.jdk/Contents/Home
jvm.arguments=
offline.mode=false
override.workspace.settings=true
Expand Down
22 changes: 9 additions & 13 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,18 +22,14 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
compileSdkVersion 33
compileSdkVersion 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -49,8 +46,8 @@ android {

defaultConfig {
applicationId "com.kounex.obsBlade"
minSdkVersion 20
targetSdkVersion 33
minSdkVersion flutter.minSdkVersion
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand All @@ -76,5 +73,4 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
13 changes: 0 additions & 13 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
buildscript {
ext.kotlin_version = '1.9.20'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand Down
30 changes: 22 additions & 8 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.2.1" apply false
id "org.jetbrains.kotlin.android" version "2.0.20" apply false
}

include ":app"
4 changes: 3 additions & 1 deletion lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ import 'utils/styling_helper.dart';
// GlobalKey<NavigatorState> rootNavKey = GlobalKey();

class App extends StatelessWidget {
const App({super.key});
const App({
super.key,
});

ThemeData _getCurrentTheme(Box settingsBox) {
Brightness? brightness;
Expand Down
2 changes: 1 addition & 1 deletion lib/purchase_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class PurchaseBase extends StatefulWidget {
final Widget child;

const PurchaseBase({
Key? key,
super.key,
required this.child,
});

Expand Down
2 changes: 1 addition & 1 deletion lib/shared/animator/fader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Fader extends StatefulWidget {
final Duration? showDuration;

const Fader({
Key? key,
super.key,
required this.child,
this.duration = const Duration(milliseconds: 200),
this.delay = const Duration(milliseconds: 0),
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/animator/full_overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class FullOverlay extends StatefulWidget {
final Duration showDuration;

const FullOverlay({
Key? key,
super.key,
required this.content,
required this.animationDuration,
required this.showDuration,
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/animator/status_dot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class StatusDot extends StatefulWidget {
final TextStyle? style;

const StatusDot({
Key? key,
super.key,
this.size = 12.0,
this.horizontalSpacing = 8.0,
this.verticalSpacing = 4.0,
Expand Down
4 changes: 2 additions & 2 deletions lib/shared/dialogs/confirmation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ConfirmationDialog extends StatelessWidget {
final void Function(bool isDontShowAgainChecked) onOk;

const ConfirmationDialog({
Key? key,
super.key,
required this.title,
this.body,
this.bodyWidget,
Expand All @@ -29,7 +29,7 @@ class ConfirmationDialog extends StatelessWidget {
this.enableDontShowAgainOption = false,
}) : assert(body != null && bodyWidget == null ||
body == null && bodyWidget != null),
super(key: key);
super();

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/dialogs/info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class InfoDialog extends StatelessWidget {
final Function(bool isDontShowAgainChecked)? onPressed;

const InfoDialog({
Key? key,
super.key,
required this.body,
this.title,
this.enableDontShowAgainOption = false,
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/dialogs/input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class InputDialog extends StatefulWidget {
final String? Function(String?)? inputCheck;

const InputDialog({
Key? key,
super.key,
required this.title,
required this.body,
required this.onSave,
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/general/app_bar_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class AppBarActions extends StatelessWidget {
final List<AppBarActionEntry> actions;

const AppBarActions({
Key? key,
super.key,
this.actionSheetTitle,
required this.actions,
});
Expand Down
4 changes: 2 additions & 2 deletions lib/shared/general/base/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class BaseButton extends StatelessWidget {
final EdgeInsetsGeometry? padding;

const BaseButton({
Key? key,
super.key,
this.text,
this.child,
this.icon,
Expand All @@ -33,7 +33,7 @@ class BaseButton extends StatelessWidget {
this.isDestructive = false,
this.padding,
}) : assert(child != null || text != null),
super(key: key);
super();

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/general/base/card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class BaseCard extends StatelessWidget {
final double? elevation;

const BaseCard({
Key? key,
super.key,
required this.child,
this.above,
this.below,
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/general/base/checkbox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BaseCheckbox extends StatelessWidget {
final void Function(bool?)? onChanged;

const BaseCheckbox({
Key? key,
super.key,
required this.value,
this.text,
this.smallText = false,
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/general/clean_list_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class CleanListTile extends StatelessWidget {
final Widget? trailing;

const CleanListTile({
Key? key,
super.key,
required this.title,
required this.description,
this.trailing,
Expand Down
3 changes: 2 additions & 1 deletion lib/shared/general/column_separated.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';

import 'base/divider.dart';

class ColumnSeparated extends StatelessWidget {
Expand All @@ -14,7 +15,7 @@ class ColumnSeparated extends StatelessWidget {
final Widget? customSeparator;

const ColumnSeparated({
Key? key,
super.key,
required this.children,
this.padding = const EdgeInsets.all(0),
this.useSymmetricOutsidePadding = false,
Expand Down
4 changes: 1 addition & 3 deletions lib/shared/general/connect_host_input.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:ui';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:obs_blade/shared/general/base/adaptive_text_field.dart';
Expand All @@ -21,7 +19,7 @@ class ConnectHostInput extends StatefulWidget {
final void Function(String? protocolScheme)? onChangeProtocolScheme;

const ConnectHostInput({
Key? key,
super.key,
required this.hostIP,
required this.hostDomain,
required this.manual,
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/general/cupertino_dropdown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class CupertinoDropdown<T> extends StatelessWidget {
final void Function(T?)? onChanged;

const CupertinoDropdown({
Key? key,
super.key,
this.value,
this.items,
this.selectedItemBuilder,
Expand Down
2 changes: 0 additions & 2 deletions lib/shared/general/cupertino_number_text_field.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:ui';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/general/custom_cupertino_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CustomCupertinoDialog extends StatelessWidget {
final double? paddingLeft;

const CustomCupertinoDialog({
Key? key,
super.key,
this.title,
this.content,
this.dialogWidth = 420.0,
Expand Down
6 changes: 2 additions & 4 deletions lib/shared/general/custom_expansion_tile.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:ui';

import 'package:expandable/expandable.dart';
import 'package:flutter/material.dart';

Expand All @@ -15,7 +13,7 @@ class CustomExpansionTile extends StatefulWidget {
final void Function(VoidCallback, bool)? manualExpand;

const CustomExpansionTile({
Key? key,
super.key,
this.leadingIcon,
this.headerText,
this.trailing,
Expand All @@ -26,7 +24,7 @@ class CustomExpansionTile extends StatefulWidget {
this.onExpand,
this.manualExpand,
}) : assert(headerText != null || customHeader != null),
super(key: key);
super();

@override
_CustomExpansionTileState createState() => _CustomExpansionTileState();
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/general/custom_sliver_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class CustomSliverList extends StatelessWidget {
final double? customBottomPadding;

const CustomSliverList({
Key? key,
super.key,
required this.children,
this.customTopPadding,
this.customBottomPadding,
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/general/date_range/date_picker_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class DatePickerSheet extends StatefulWidget {
final void Function(DateTime?)? updateDateTime;

const DatePickerSheet({
Key? key,
super.key,
this.selectedDate,
this.updateDateTime,
this.minimumDate,
Expand Down
4 changes: 2 additions & 2 deletions lib/shared/general/date_range/date_range.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DateRange extends StatelessWidget {
final String placeholderTo;

DateRange({
Key? key,
super.key,
this.selectedFromDate,
this.selectedToDate,
this.minimumFromDate,
Expand All @@ -33,7 +33,7 @@ class DateRange extends StatelessWidget {
this.placeholderTo = 'To...',
}) : this.maximumFromDate = selectedToDate ?? DateTime.now(),
this.minimumToDate = selectedFromDate,
super(key: key);
super();

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/general/date_range/text_field_date.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TextFieldDate extends StatelessWidget {

// ignore: prefer_const_constructors_in_immutables
TextFieldDate({
Key? key,
super.key,
required this.selectedDate,
required this.updateDateTime,
this.placeholder,
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/general/described_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DescribedBox extends StatelessWidget {
final double? width;

const DescribedBox({
Key? key,
super.key,
this.label,
this.child,
this.borderColor,
Expand Down
Loading

0 comments on commit e5edb06

Please sign in to comment.