Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update ffmpeg service #23

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7bc1ba5
feat: update ThemeBottomSheet theme to use material you guidelines
BBarisKilic Mar 27, 2024
e9745b6
feat: update AppNavigationBar and its icons
BBarisKilic Mar 27, 2024
5a98e96
feat: update SettingsBottomSheet and SaveBottomSheet to follow materi…
BBarisKilic Mar 27, 2024
deb416d
build(deps): upgrade packages and set min dart sdk to 3.3.0
BBarisKilic Apr 5, 2024
d6d687f
refactor: removed useMaterial3 assignment from ThemeData since it is …
BBarisKilic Apr 6, 2024
f87824a
feat: add SystemUiOverlayStyle to match systemNavigationBarColor with…
BBarisKilic Apr 6, 2024
c262255
build(deps): upgrade video_player_service to version 1.1.0
BBarisKilic Apr 7, 2024
17c1e8e
feat: add NavigationConfirmDialog
BBarisKilic Apr 7, 2024
6271ffd
build: migrate from deprecated imperative apply of Flutter's Gradle p…
BBarisKilic Apr 8, 2024
bf843cf
refactor: disable preview on AssetPicker
BBarisKilic Apr 8, 2024
3ca50f8
feat: add enableProgressCallback operation to the FFmpegService
BBarisKilic Apr 9, 2024
e2b532c
refactor: apply linter rules
BBarisKilic Apr 9, 2024
75a42ef
refactor: update FFmpegService and add custom exceptions
BBarisKilic Apr 13, 2024
3d36291
docs: add documentations to the FFmpegService
BBarisKilic Apr 13, 2024
663a912
refactor: apply try-catch in FFmpeg service where necessary
BBarisKilic Apr 13, 2024
04e86a5
feat: create SaveBottomSheetCubit and its state
BBarisKilic Apr 13, 2024
4b32617
feat: connect SaveBottomSheetState with SaveBottomSheet widget
BBarisKilic Apr 13, 2024
fbe11b4
feat: add localization support for SaveBottomSheet
BBarisKilic Apr 13, 2024
c2b68b5
feat: redesign SaveBottomSheet
BBarisKilic Apr 14, 2024
4496d12
build(deps): add android_intent_plus as a dependency
BBarisKilic Apr 15, 2024
761327c
refactor: create sub-widgets for _SaveBottomSheet widget
BBarisKilic Apr 15, 2024
614af40
refactor: update SaveBottomSheetCubit
BBarisKilic Apr 15, 2024
a817909
feat: create FFmpegService package
BBarisKilic Apr 15, 2024
3812d82
build(deps): add newly created FFmpegService package as a dependency
BBarisKilic Apr 15, 2024
91586f4
build(deps): add wakelock_service as a dependency
BBarisKilic Apr 15, 2024
890865b
feat: use wakelock_service in SaveBottomSheetCubit
BBarisKilic Apr 15, 2024
f94a43f
build: create devtools_options.yaml
BBarisKilic Apr 15, 2024
2af61ee
build(deps): upgrade wakelock_service version to 1.1.0
BBarisKilic Apr 16, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ app.*.map.json
!.idea/codeStyles/
!.idea/dictionaries/
!.idea/runConfigurations/
/.fvmrc
117 changes: 117 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 8 additions & 15 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "kotlin-kapt"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +13,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 @@ -27,11 +29,6 @@ if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

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

android {
namespace "com.BBKDevelopment.VMerge"
compileSdkVersion localProperties.getProperty('flutter.compileSdkVersion').toInteger()
Expand All @@ -51,10 +48,7 @@ android {
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.BBKDevelopment.VMerge"
// 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.
minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger()
targetSdkVersion localProperties.getProperty('flutter.targetSdkVersion').toInteger()
versionCode flutterVersionCode.toInteger()
Expand All @@ -80,7 +74,7 @@ android {
}

flavorDimensions "default"
productFlavors {
productFlavors {
production {
dimension "default"
applicationIdSuffix ""
Expand Down Expand Up @@ -115,7 +109,6 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.github.bumptech.glide:glide:4.14.2'
kapt 'com.github.bumptech.glide:compiler:4.14.2'
}
12 changes: 8 additions & 4 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
</manifest>
29 changes: 17 additions & 12 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.BBKDevelopment.VMerge">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>

<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />

<application
android:label="${appName}"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/ic_launcher"
android:label="${appName}">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
Expand Down
15 changes: 1 addition & 14 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
buildscript {
ext.kotlin_version = '1.7.22'
repositories {
google()
mavenCentral()
}

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

allprojects {
repositories {
google()
Expand All @@ -28,4 +15,4 @@ subprojects {

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
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.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.22" apply false
}

include ":app"
2 changes: 1 addition & 1 deletion assets/images/merge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/images/more.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/images/video.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions devtools_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extensions:
5 changes: 2 additions & 3 deletions lib/bootstrap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'dart:developer';

import 'package:bloc/bloc.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
import 'package:get_it/get_it.dart';
import 'package:launch_review_service/launch_review_service.dart';
Expand Down Expand Up @@ -65,7 +65,6 @@ Future<void> bootstrap(FutureOr<Widget> Function() builder) async {

final widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark);

await Future.wait(
[
Expand Down Expand Up @@ -153,7 +152,7 @@ final class ObjectBoxService {
static Future<ObjectBoxService> create() async {
final appDocsDir = await getApplicationDocumentsDirectory();
final store =
await openStore(directory: join(appDocsDir.path, "obx-example"));
await openStore(directory: join(appDocsDir.path, 'obx-example'));
return ObjectBoxService._create(store);
}
}
1 change: 0 additions & 1 deletion lib/components/custom_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
title,
style: Theme.of(context).textTheme.titleLarge,
),
elevation: 0,
centerTitle: true,
bottom: const PreferredSize(
preferredSize: Size.fromHeight(1),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/app/presentation/cubits/app_cubit/app_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ final class AppInitialized extends AppState {
}

@override
List<Object> get props => [themeMode, mainColor];
List<Object?> get props => [themeMode, mainColor];
}
1 change: 0 additions & 1 deletion lib/src/config/themes/dark_app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ final class DarkAppTheme implements AppTheme {
/// {@macro dark_app_theme}
DarkAppTheme(Color mainColor)
: data = ThemeData(
useMaterial3: true,
fontFamily: FontFamily.robotoMono,
brightness: Brightness.dark,
colorSchemeSeed: mainColor,
Expand Down
1 change: 0 additions & 1 deletion lib/src/config/themes/light_app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ final class LightAppTheme implements AppTheme {
/// {@macro light_app_theme}
LightAppTheme(Color mainColor)
: data = ThemeData(
useMaterial3: true,
fontFamily: FontFamily.robotoMono,
brightness: Brightness.light,
colorSchemeSeed: mainColor,
Expand Down
Loading
Loading