Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 17 additions & 19 deletions remote/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 @@ -21,11 +27,6 @@ if (keystorePropertiesFile.exists()) {

def vcode = (int)(((new Date().getTime()/1000) - 1610737340) / 10)

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 @@ -36,31 +37,28 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

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

android {
compileSdkVersion 34
namespace 'com.rtirl.kit'
compileSdkVersion 35
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

kotlinOptions {
jvmTarget = '1.8'
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
kotlinOptions {
jvmTarget = '17'
}

defaultConfig {
applicationId "com.rtirl.kit"
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
versionCode vcode
versionName flutterVersionName
}
Expand All @@ -86,5 +84,5 @@ flutter {
}

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

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

allprojects {
repositories {
google()
Expand Down
2 changes: 1 addition & 1 deletion remote/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,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.6-all.zip
43 changes: 35 additions & 8 deletions remote/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
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"
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
classpath("com.android.tools:r8:8.3.38")
}
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.4.0" apply false
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
id "com.google.protobuf" version "0.8.12" apply false
}

include ":app"
9 changes: 5 additions & 4 deletions remote/lib/screens/control_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,11 @@ class ControlScreen extends StatelessWidget {
),
_ControlBox(
title: 'Save Replay',
boxColor: yellow.withOpacity(
channelStatus.obsReplayBuffer == 'started'
? 1
: 0.4),
boxColor: yellow.withValues(
alpha:
channelStatus.obsReplayBuffer == 'started'
? 1
: 0.4),
icon: Icons.save_alt,
onTap: channelStatus.obsReplayBuffer == 'started'
? () => saveReplayBuffer(channelId)
Expand Down
11 changes: 5 additions & 6 deletions remote/lib/themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const detailColor = Color(0xFF121312);
const textFieldBgColor = Color(0xFFF6F3ED);

MaterialColor generateMaterialColor(Color color) {
return MaterialColor(color.value, {
return MaterialColor(color.toARGB32(), {
50: tintColor(color, 0.5),
100: tintColor(color, 0.4),
200: tintColor(color, 0.3),
Expand All @@ -32,9 +32,9 @@ int tintValue(int value, double factor) =>
max(0, min((value + ((255 - value) * factor)).round(), 255));

Color tintColor(Color color, double factor) => Color.fromRGBO(
tintValue(color.red, factor),
tintValue(color.green, factor),
tintValue(color.blue, factor),
tintValue((color.r * 255).round(), factor),
tintValue((color.g * 255).round(), factor),
tintValue((color.b * 255).round(), factor),
1);

class Themes {
Expand Down Expand Up @@ -69,8 +69,7 @@ class Themes {
listTileTheme: const ListTileThemeData(iconColor: Colors.white),
canvasColor: backgroundColor,
cardColor: backgroundColor,
dialogBackgroundColor: backgroundColor,
dialogTheme: const DialogTheme(
dialogTheme: const DialogThemeData(
titleTextStyle: TextStyle(color: primaryTextColor),
),
appBarTheme: const AppBarTheme(
Expand Down
24 changes: 22 additions & 2 deletions remote/lib/urls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,29 @@ import 'package:url_launcher/url_launcher.dart';

Future<void> openUrl(Uri url) async {
if (!url.hasScheme) {
await customtabs.launch(url.replace(scheme: 'http').toString());
await customtabs.launchUrl(
url.replace(scheme: 'http'),
customTabsOptions: const customtabs.CustomTabsOptions(
shareState: customtabs.CustomTabsShareState.on,
urlBarHidingEnabled: true,
showTitle: true,
),
safariVCOptions: const customtabs.SafariViewControllerOptions(
barCollapsingEnabled: true,
dismissButtonStyle:
customtabs.SafariViewControllerDismissButtonStyle.close,
),
);
} else if (url.isScheme("http") || url.isScheme("https")) {
await customtabs.launch(url.toString());
await customtabs.launchUrl(url,
customTabsOptions: const customtabs.CustomTabsOptions(
shareState: customtabs.CustomTabsShareState.on,
urlBarHidingEnabled: true,
showTitle: true,
),
safariVCOptions: const customtabs.SafariViewControllerOptions(
barCollapsingEnabled: true,
));
} else {
await launchUrl(url);
}
Expand Down
44 changes: 30 additions & 14 deletions remote/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ packages:
dependency: transitive
description:
name: async
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev"
source: hosted
version: "2.12.0"
version: "2.13.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -125,10 +125,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev"
source: hosted
version: "1.3.2"
version: "1.3.3"
ffi:
dependency: transitive
description:
Expand Down Expand Up @@ -178,26 +178,42 @@ packages:
dependency: "direct main"
description:
name: flutter_custom_tabs
sha256: e90e5b7cad5648aeb0e1ed04aa3c0cada62d86f3b5d4aaef488ab7de61ec2a9f
sha256: ac3543d7b4e0ac6ecdf3744360039ebb573656c0ce759149d228e1934d4f7535
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "2.4.0"
flutter_custom_tabs_android:
dependency: transitive
description:
name: flutter_custom_tabs_android
sha256: "925fc5e7d27372ee523962dcfcd4b77c0443549482c284dd7897b77815547621"
url: "https://pub.dev"
source: hosted
version: "2.3.1"
flutter_custom_tabs_ios:
dependency: transitive
description:
name: flutter_custom_tabs_ios
sha256: c61a58d30b29ccb09ea4da0daa335bbf8714bcf8798d0d9f4f58a0b83c6c421b
url: "https://pub.dev"
source: hosted
version: "2.4.0"
flutter_custom_tabs_platform_interface:
dependency: transitive
description:
name: flutter_custom_tabs_platform_interface
sha256: "1d6b9eb6c5671b21511fdb47babf18aa65982784373986c003aaf67ca78798ad"
sha256: "54a6ff5cc7571cb266a47ade9f6f89d1980b9ed2dba18162a6d5300afc408449"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "2.3.0"
flutter_custom_tabs_web:
dependency: transitive
description:
name: flutter_custom_tabs_web
sha256: dbb5689a97c2398aa5dbcfc9cd59cffea5518ec815e9d23def448dc143cb02be
sha256: "236e035c73b6d3ef0a2f85cd8b6b815954e7559c9f9d50a15ed2e53a297b58b0"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "2.3.0"
flutter_launcher_icons:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -268,10 +284,10 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
url: "https://pub.dev"
source: hosted
version: "10.0.8"
version: "10.0.9"
leak_tracker_flutter_testing:
dependency: transitive
description:
Expand Down Expand Up @@ -649,10 +665,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
url: "https://pub.dev"
source: hosted
version: "14.3.1"
version: "15.0.0"
web:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion remote/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies:
cloud_firestore: ^4.12.0
cupertino_icons: ^1.0.6
firebase_core: ^2.20.0
flutter_custom_tabs: ^1.2.1
flutter_custom_tabs: ^2.4.0
http: ^1.2.0
mobile_scanner: ^3.5.7
package_info_plus: ^4.2.0
Expand Down