Tutorial for integrating flutter to your new or existing android app.

Overview

AddFlutter2Existing Android App

Tutorial for adding flutter to your new or existing android app.

Link to tutorial

Android

Create a Flutter module

Let's assume you have an existing Android app at some/path/MyApp, and that you want your Flutter project as a sibling:

cd some/path/
$ flutter create -t module my_flutter

This creates a some/path/my_flutter/ Flutter module project with some Dart code to get you started and a .android/ hidden subfolder that wraps up the module project in an Android library.

(While not required in what follows, if you so desire, you can build that library using Gradle:

$ cd .android/
$ ./gradlew flutter:assembleDebug

Make the host app depend on the Flutter module

Include the Flutter module as a sub-project in the host app's settings.gradle:

// MyApp/settings.gradle
include ':app'                                     // assumed existing content
setBinding(new Binding([gradle: this]))                                 // new
evaluate(new File(                                                      // new
  settingsDir.parentFile,                                               // new
  'my_flutter/.android/include_flutter.groovy'                          // new
))                                                                      // new

The binding and script evaluation allows the Flutter module to include itself (as :flutter) and any Flutter plugins used by the module (as :package_info, :video_player, etc) in the evaluation context of your settings.gradle.

Introduce an implementation dependency on the Flutter module from your app:

// MyApp/app/build.gradle
:
dependencies {
  implementation project(':flutter')
  :
}

More in the video

Getting Started

For help getting started with Flutter, view our online documentation.

You might also like...

Collection of all the widgets with their tutorial

Flutter Widgets A collection of flutter widgets with tutorials. Season 1 Episode 1 - Sized Box Episode 2 - Animated Builder Episode 3 - Draggable and

Oct 4, 2022

In this tutorial, we'll create a Quiz application using AQUEDUCT FRAMEWORK.

Quiz API Dart An application built with aqueduct. Topics Covered How to Setup Aqueduct ? How to write your first REST API ? How to make controllers ?

Mar 2, 2022

The objective of this tutorial is to learn about asynchronous programming in Dart.

The objective of this tutorial is to learn about asynchronous programming in Dart.

The objective of this tutorial is to learn about asynchronous programming in Dart. We'll look at how to carry out time consuming tasks such as getting device location and networking to get data from the internet.

Oct 5, 2021

In this tutorial we will be reviewing Stateful and Stateless Widgets as well as learning about the fundamental building blocks of Object Oriented Programming (OOP

In this tutorial we will be reviewing Stateful and Stateless Widgets as well as learning about the fundamental building blocks of Object Oriented Programming (OOP

In this tutorial we will be reviewing Stateful and Stateless Widgets as well as learning about the fundamental building blocks of Object Oriented Programming (OOP) - Classes and Objects.

Oct 3, 2021

Check out the new style for App Design aims for Payment App

Check out the new style for App Design aims for Payment App

๐Ÿ’ฐ Payment App UI Check out the new style for App Design aims for Payment App... ๐Ÿ˜‰ ๐Ÿ˜€ ๐Ÿ˜ ๐Ÿ˜Ž You can Install and test latest app from below ๐Ÿ‘‡ ๐Ÿ“ธ Scre

Dec 12, 2022

Flutter HBO Profile - A new Flutter project inspired by the HBO App

Flutter HBO Profile - A new Flutter project inspired by the HBO App

FLUTTER HBO PROFILE A new Flutter project inspired by the HBO App.

Jan 18, 2022

A new Flutter package which helps developers in creating walkthrough of their app.

A new Flutter package which helps developers in creating walkthrough of their app.

flutter_walkthrough A new Flutter package for both android and iOS which helps developers in creating animated walkthrough of their app. Show some โค๏ธ

Sep 20, 2022

A Brand New Flutter Weather App

A Brand New Flutter Weather App

A Brand New Flutter Weather App

Aug 25, 2022

A New Flutter App Project To Manage Tasks

A New Flutter App Project To Manage Tasks

A new Flutter app project to manage tasks. Getting Started A few resources to get you started if this is your first Flutter project: Lab: Write your f

Apr 16, 2022
Comments
Owner
Pawan Kumar
GoogleDevExpert for Flutter, Firebase, Dart & Web Tech. Public Speaker, Blogger, Entrepreneur & YouTuber. Founder of MTechViral & Let's Flutter with Dart.
Pawan Kumar
Flutter: Integrate Google Maps Tutorial Flutter: Integrate Google Maps Tutorial

Flutter Google Maps APP Show some โค๏ธ and star the repo to support the project A new Flutter project. Getting Started Flutter Project Add this to your

Pawan Kumar 69 Oct 27, 2022
Flutter Advanced: TensorFlow Lite | Object Detection | YoloV2 | SSD Tutorial ||| SSD Tutorial

tflite_demo A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

Pawan Kumar 70 Nov 28, 2022
A flutter plugin for integrating Mobile Money Payments to your flutter apps

Add Mobile Money payments to your flutter apps using the FlutterWave api gateway. Features Recieve Payments through Mobile Money in Uganda Supports MT

null 5 Nov 9, 2022
A basic demo example for integrating between Appwrite & Flutter ๐Ÿ’™

?? Quiz With Flutter A simple Quiz App built with Flutter and Appwrite ?? Getting Started ?? Install Appwrite Follow our simple Installation Guide to

Appwrite 35 Nov 22, 2022
A basic demo example for integrating between Appwrite & Flutter ๐Ÿ’™

?? Todo With Flutter A simple todo app built with Flutter and Appwrite ?? Getting Started Appwrite is an end-to-end backend server for Web, Mobile, Na

Appwrite 27 Dec 15, 2022
Flutter Advanced: PDF Viewer Tutorial Android & IOS | From URL & Asset | From URL & Asset

flutterpdfview A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started i

Pawan Kumar 71 Jun 24, 2022
TutorialCoachMark - Create a beautiful and easy tutorial for your application.

TutorialCoachMark Create a beautiful and easy tutorial for your application. Example 1 Example 2 Usage To use this plugin, add tutorial_coach_mark as

Rafael Almeida Barbosa 423 Dec 25, 2022
2 Flutter PWA Tutorial - 1/2

got_nagpur A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if th

Pawan Kumar 27 Aug 27, 2022
Tutorial about routes, push and pushNamed

flutterroutes A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

Pawan Kumar 22 Mar 12, 2022