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
14 changes: 14 additions & 0 deletions obs_flutter/obs/obs_demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,17 @@ A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

- Clone the repo from the github into your system
- Packages used
- http: ^0.13.3
- path_provider: ^2.0.2
- audioplayers: ^4.1.0
- record: ^4.4.4
- permission_handler: ^11.3.1
- audio_waveforms: ^1.0.5
- how to add the package
- flutter pub add package_name
- If already have android studio than through vs code you can ctr+hipt+p
- Launch emulater than select the emmulater
- Than run the cammond `flutter run`
10 changes: 8 additions & 2 deletions obs_flutter/obs/obs_demo/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,17 @@ android {
applicationId = "com.example.obs_demo"
// 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.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
minSdk =24
targetSdk = 31
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName
}
configurations.all {
resolutionStrategy {
force "org.jetbrains.kotlin:kotlin-stdlib:1.8.20"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.20"
}
}

buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- Optional: Add this permission if you want to use bluetooth telephony device like headset/earbuds -->
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<!-- Optional: Add this permission if you want to save your recordings in public folders -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:label="obs_demo"
android:name="${applicationName}"
Expand Down
14 changes: 14 additions & 0 deletions obs_flutter/obs/obs_demo/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
buildscript {
ext {
kotlin_version = '1.8.20' // Define the Kotlin version here
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.2" // Use the appropriate version for your project
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand Down
2 changes: 0 additions & 2 deletions obs_flutter/obs/obs_demo/lib/editortext.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class _EditorTextLayoutState extends State<EditorTextLayout> {
final jsonData = await file.readAsString();
final data = jsonDecode(jsonData) as Map<String, dynamic>;
_controller.text = data['story'][0]['text'];
data['story'][0]['isEmpty'] = false;
return data;
} on FileSystemException {
return <String, dynamic>{};
Expand Down Expand Up @@ -315,7 +314,6 @@ class _EditorTextLayoutState extends State<EditorTextLayout> {

void saveData(String value) async {
story['story'][paraIndex]['text'] = value;
story['story'][paraIndex]['isEmpty'] = value.isEmpty;
writeJsonToFile(story);
widget.onUpdateTextAvailability(value.isNotEmpty);
print('Data saved: $value');
Expand Down
2 changes: 0 additions & 2 deletions obs_flutter/obs/obs_demo/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import 'package:flutter/material.dart';
import 'package:obs_demo/CreateUserPage.dart';
import 'package:obs_demo/screen/bottomNavi.dart';
import 'package:obs_demo/screen/dashboard.dart';

void main() {
runApp(const MyApp());
Expand Down
Loading