- This Project is Flutter App
- Main Goals : Implement to Existing Android Project
- Adding some code in pubspec.yaml
flutter:
module:
androidX: true
androidPackage: [Package.Name] Example : com.example.fluttermodule
iosBundleIdentifier: [Package.Name] Example : com.example.fluttermodule
- Run Flutter Pub Get
flutter pub get
-
Add Flutter Project
-
Manual Integration
- Copy / Move Inside Folder Android Native
-
Submodule Integration
- Code
git submodule add <link-repo-github>
- Sample
git submodule add https://github.com/amirisback/flutter-inject-to-native
-
-
Add some code in settings.gradle
import org.gradle.api.initialization.resolve.RepositoriesMode
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
// Add these two maven entries.
maven { url '../flutter-inject-to-native/build/host/outputs/repo' }
maven { url 'https://storage.googleapis.com/download.flutter.io' }
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_PROJECT) // Change to PREFER_PROJECT
repositories {
google()
mavenCentral()
// Add these two maven entries.
maven { url '../flutter-inject-to-native/build/host/outputs/repo' }
maven { url 'https://storage.googleapis.com/download.flutter.io' }
}
}
include ':app'
setBinding(new Binding([gradle: this]))
// Using SettingsDir, because flutter project not siblings but inside the existing project
evaluate(new File(settingsDir, 'flutter-inject-to-native/.android/include_flutter.groovy'))
- Add some code in build.gradle (root project)
allprojects {
repositories {
google()
mavenCentral()
// Add these two maven entries.
maven { url '../../flutter-inject-to-native/build/host/outputs/repo' }
maven { url 'https://storage.googleapis.com/download.flutter.io' }
}
}
-
Add some code in build.gradle (app)
- In Default Config
ndk { // Filter for architectures supported by Flutter. abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64' }
- Above dependencies area
repositories { google() mavenCentral() // Add these two maven entries. maven { url '../flutter-inject-to-native/build/host/outputs/repo' } maven { url 'https://storage.googleapis.com/download.flutter.io' } }
- In Dependencies area
dependencies { implementation project(':flutter') }
- https://docs.flutter.dev/development/add-to-app/android/project-setup
- https://github.com/flutter/samples/tree/main/add_to_app
- https://medium.com/flutter/put-flutter-to-work-95f5fdcc592e
- https://github.com/flutter/put-flutter-to-work
- https://levelup.gitconnected.com/how-to-add-flutter-to-android-app-4d80d9820686
- https://flatteredwithflutter.com/how-to-add-flutter-to-android-app/
- https://pahlevikun.medium.com/bridging-between-dart-and-native-code-with-flutter-channel-for-communicate-each-other-7c736929ee42
This project is a starting point for a Flutter application.
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, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Very open to anyone, I'll write your name under this, please contribute by sending an email to me
- Mail To [email protected]
- Subject : Github _ [Github-Username-Account] _ [Language] _ [Repository-Name]
- Example : Github_amirisback_kotlin_admob-helper-implementation
Name Of Contribute
- Muhammad Faisal Amir
- Waiting List
- Waiting List
Waiting for your contribute
- Please enjoy and don't forget fork and give a star
- Don't Forget Follow My Github Account