Updated android project, dependencies and more
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -44,3 +44,4 @@ app.*.map.json
|
|||||||
|
|
||||||
# Env file
|
# Env file
|
||||||
.env
|
.env
|
||||||
|
android/app/.cxx
|
||||||
|
|||||||
@@ -31,16 +31,16 @@ if (keystorePropertiesFile.exists()) {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "com.jgeek00.linkdy"
|
namespace "com.jgeek00.linkdy"
|
||||||
compileSdkVersion 34
|
compileSdkVersion 35
|
||||||
ndkVersion flutter.ndkVersion
|
ndkVersion flutter.ndkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_21
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_21
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = '1.8'
|
jvmTarget = '21'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
@@ -50,7 +50,7 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.jgeek00.linkdy"
|
applicationId "com.jgeek00.linkdy"
|
||||||
minSdkVersion 26
|
minSdkVersion 26
|
||||||
targetSdkVersion 34
|
targetSdkVersion 35
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
package="com.jgeek00.linkdy">
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<application
|
<application
|
||||||
android:label="Linkdy"
|
android:label="Linkdy"
|
||||||
@@ -29,11 +28,22 @@
|
|||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.SEND" />
|
<action android:name="android.intent.action.SEND" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<data android:mimeType="text/*" />
|
<data android:mimeType="text/*" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data
|
||||||
|
android:scheme="https"
|
||||||
|
android:host="example.com"
|
||||||
|
android:pathPrefix="/invite" />
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<!-- Don't delete the meta-data below.
|
<!-- Don't delete the meta-data below.
|
||||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.7.10'
|
ext.kotlin_version = '1.9.25'
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
org.gradle.jvmargs=-Xmx4G
|
org.gradle.jvmargs=-Xmx4G
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
android.defaults.buildfeatures.buildconfig=true
|
||||||
|
android.nonTransitiveRClass=false
|
||||||
|
android.nonFinalResIds=false
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ pluginManagement {
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
id "com.android.application" version "7.3.0" apply false
|
id "com.android.application" version '8.2.2' apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
include ":app"
|
include ":app"
|
||||||
|
|||||||
@@ -4,13 +4,12 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:dynamic_color/dynamic_color.dart';
|
import 'package:dynamic_color/dynamic_color.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:linkdy/utils/sentry_handle_error.dart';
|
import 'package:linkdy/utils/sentry_handle_error.dart';
|
||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
import 'package:receive_sharing_intent_plus/receive_sharing_intent_plus.dart';
|
import 'package:receive_sharing_intent/receive_sharing_intent.dart';
|
||||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
@@ -67,40 +66,46 @@ void main() async {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyApp extends HookConsumerWidget {
|
class MyApp extends StatefulHookConsumerWidget {
|
||||||
const MyApp({super.key});
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
ConsumerState<MyApp> createState() => _MyAppState();
|
||||||
final selectedColor = ref.watch(appStatusProvider).selectedColor;
|
}
|
||||||
final useDynamicColor = ref.watch(appStatusProvider).useDynamicTheme;
|
|
||||||
|
|
||||||
useEffect(
|
class _MyAppState extends ConsumerState<MyApp> {
|
||||||
() {
|
@override
|
||||||
// When app is on background
|
void initState() {
|
||||||
ReceiveSharingIntentPlus.getTextStream().listen(
|
super.initState();
|
||||||
|
|
||||||
|
ReceiveSharingIntent.instance.getMediaStream().listen(
|
||||||
(value) {
|
(value) {
|
||||||
if (value.isNotEmpty) {
|
if (value.isNotEmpty &&
|
||||||
ref.read(receiveSharingIntentUrlProvider.notifier).setValue(value);
|
(value.first.type == SharedMediaType.url || (value.first.type == SharedMediaType.text))) {
|
||||||
|
ref.read(receiveSharingIntentUrlProvider.notifier).setValue(value.first.path);
|
||||||
ref.read(routerProvider).go(RoutesPaths.bookmarks);
|
ref.read(routerProvider).go(RoutesPaths.bookmarks);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onError: (e, stackTrace) => Sentry.captureException(e, stackTrace: stackTrace),
|
onError: (e, stackTrace) => Sentry.captureException(e, stackTrace: stackTrace),
|
||||||
);
|
);
|
||||||
|
|
||||||
// When app is closed
|
ReceiveSharingIntent.instance.getInitialMedia().then(
|
||||||
ReceiveSharingIntentPlus.getInitialText().then((value) {
|
(value) {
|
||||||
if (value != null) {
|
if (value.isNotEmpty &&
|
||||||
ref.read(receiveSharingIntentUrlProvider.notifier).setValue(value);
|
(value.first.type == SharedMediaType.url || (value.first.type == SharedMediaType.text))) {
|
||||||
|
ref.read(receiveSharingIntentUrlProvider.notifier).setValue(value.first.path);
|
||||||
ref.read(routerProvider).go(RoutesPaths.bookmarks);
|
ref.read(routerProvider).go(RoutesPaths.bookmarks);
|
||||||
|
ReceiveSharingIntent.instance.reset();
|
||||||
}
|
}
|
||||||
ReceiveSharingIntentPlus.reset();
|
|
||||||
});
|
|
||||||
|
|
||||||
return null;
|
|
||||||
},
|
},
|
||||||
[],
|
onError: (e, stackTrace) => Sentry.captureException(e, stackTrace: stackTrace),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final selectedColor = ref.watch(appStatusProvider).selectedColor;
|
||||||
|
final useDynamicColor = ref.watch(appStatusProvider).useDynamicTheme;
|
||||||
|
|
||||||
return DynamicColorBuilder(
|
return DynamicColorBuilder(
|
||||||
builder: (lightDynamic, darkDynamic) {
|
builder: (lightDynamic, darkDynamic) {
|
||||||
|
|||||||
548
pubspec.lock
548
pubspec.lock
File diff suppressed because it is too large
Load Diff
@@ -63,7 +63,10 @@ dependencies:
|
|||||||
url: https://github.com/JGeek00/flutter_split_view
|
url: https://github.com/JGeek00/flutter_split_view
|
||||||
ref: master-alt
|
ref: master-alt
|
||||||
super_context_menu: ^0.8.16
|
super_context_menu: ^0.8.16
|
||||||
receive_sharing_intent_plus: ^1.0.1
|
receive_sharing_intent:
|
||||||
|
git:
|
||||||
|
url: https://github.com/JGeek00/receive_sharing_intent
|
||||||
|
ref: master
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
build_runner: ^2.4.8
|
build_runner: ^2.4.8
|
||||||
|
|||||||
Reference in New Issue
Block a user