Subscribe For Newsletter

Recent Posts
Also Checkout Recent forum posts
No topics yet!

How to develop a web and mobile application with flutter as frontend and Spring Java as backend?

Develop a web and mobile application

develop a web and mobile application with flutter as frontend and Spring Java as backend

Flutter has been created to give developers a fast development framework, and to users, a great engaging and fast experience. . With Flutter for web, you can compile existing Flutter code written in Dart into a client experience that can be embedded in the browser and deployed to any web server. You can use all the features of Flutter, and you don’t need a browser plug-in.

How to install

In-order to develop for web you need flutter 1.5 and above, it enable support for targeting the web with Flutter, including Dart compilation to JavaScript. To use the Flutter SDK with the flutter_web preview make sure you have upgraded Flutter to at least v1.5.4 by running flutter upgrade from your machine.

$ flutter upgrade

To install the webdev package, which provides the build tools for Flutter for web, run the following:

$ flutter packages pub global activate webdev

Ensure that the $HOME/.pub-cache/bin directory is in your path, and then you may use the webdev command directly from your terminal.

In-order to add$HOME/.pub-cache/bin to your path, open path file by running below mentioned command from your terminal.

$ touch ~/.bash_profile; open ~/.bash_profile

It will open the file with TextEdit, make sure to have a reference to all components in your PATH and save it. If you open it again you’ll find your edits.

flutter sdk: 
export PATH=$PATH:[Path to your flutter directory]/flutter/bindart sdk:
export PATH=$PATH:[Path to your flutter directory]/flutter/bin/cache/dart-sdk/binwebdev:
mac:
export PATH=$PATH:$HOME/.pub-cache/bin
windows: %USERPROFILE%\AppData\Roaming\Pub\Cache\bin
linux: $HOME/flutter/.pub-cache/bin

Note: if you have problems configuring webdev to run directly, try:
flutter packages pub global run webdev [command].

Tools support for Flutter web development

nce the environment setup is done, you are gonna be needing an IDE to start developing for web. Choose your favourite IDE and follow the step by step instructions available below:

Visual Studio Code

Visual Studio Code supports Flutter web development with the v3.0 release of the Flutter extension.

  • install the Flutter SDK
  • set up VS Code
  • configure VS Code to point to your local Flutter SDK
  • run the Flutter: New Web Project command from VS Code
  • after the project is created, run your app by pressing F5 or “Debug -> Start Debugging”
  • VS Code will use the webdev command-line tool to build and run your app; a new Chrome window should open, showing your running app

Using from IntelliJ

  • install the Flutter SDK
  • set up your copy of IntelliJ or Android Studio
  • configure IntelliJ or Android Studio to point to your local Flutter SDK
  • create a new Dart project; note, for a Flutter for web app, you want to start from the Dart project wizard, not the Flutter project wizard
  • from the Dart project wizard, select the ‘Flutter for web’ option for the application template
  • create the project; pub get will be run automatically
  • once the project is created, hit the run button on the main toolbar
  • IntelliJ will use the webdev command-line tool to build and run your app; a new Chrome window should open, showing your running app

Using Android Studio

In-order to create a web project with Stagehand, you need tofollow the instructions below:

  • install the Flutter SDK
  • set up your copy of Android Studio
  • configure Android Studio to point to your local Flutter SDK
  • As an example, here is how you create a simple web project with Stagehand:
$ mkdir flutter_web_project
$ cd flutter_web_project
$ stagehand web-simple
$ stagehand
  • once the project is created, open that project in Android Studio and add the following dependencies in your pubspec.yaml file
dependencies:
flutter_web: any
flutter_web_ui: any

dev_dependencies:
# Enables the `pub run build_runner` command
build_runner: ^1.1.2
# Includes the JavaScript compilers
build_web_compilers: ^1.0.0

# flutter_web packages are not published to pub.dartlang.org
# These overrides tell the package tools to get them from GitHub
dependency_overrides:
flutter_web:
git:
url: https://github.com/flutter/flutter_web
path: packages/flutter_web
flutter_web_ui:
git:
url: https://github.com/flutter/flutter_web
path: packages/flutter_web_ui
  • run pub get from your terminal, this will download all the necessary packages
  • create a lib folder in the root directory of your project
  • now create amain.dart file in the lib folder and paste the following code in it:
import 'package:flutter_web/material.dart';

void main() => runApp(Text('Hello World', textDirection: TextDirection.ltr));
  • open the main.dart file present in web folder and paste the following code in it:
import 'package:fancy_proj/main.dart' as app;
import 'package:flutter_web_ui/ui.dart' as ui;

main() async {
await ui.webOnlyInitializePlatform();
app.main();
}
$ webdev serve[INFO] Generating build script completed, took 331ms
...
[INFO] Building new asset graph completed, took 1.4s
...
[INFO] Running build completed, took 27.9s
...
[INFO] Succeeded after 28.1s with 618 outputs (3233 actions)
Serving `web` on http://localhost:8080

Getting (stateless) hot-reload with webdev

To use webdev with hot-reload, run the following within your project directory:

$ webdev serve --auto restart

You’ll notice a similar output to flutter packages pub run build_runner serve but now changes to your application code should cause a quick refresh of the application on save.

Note: the --hot-reload option is not perfect. If you notice unexpected behaviour, you may want to manually refresh the page.

Note: the --hot-reload option is currently “stateless”. Application state will be lost on reload. We do hope to offer “stateful” hot-reload on the web – we’re actively working on it!

Develop a mobile application

https://redcrix.com/mobile-app-development-company-in-chandigarh/ with flutter as a frontend and java spring java as backend :

First of all, make sure you have Android Studio version 3.0+. Do you have one? Great, now you need to install Flutter plugin;

  1. Start Android Studio.
  2. Open plugin preferences (Preferences>Plugins on macOS, File>Settings>Plugins on Windows & Linux).
  3. Select Browse repositories…, select the Flutter plug-in and click install.
  4. Now you can create a new project for Flutter: File> New> New Flutter Project.

Develop a web and mobile application

Share Post On:

33 thoughts on “How to develop a web and mobile application with flutter as frontend and Spring Java as backend?

  1. Long time supporter, and thought I’d drop a comment.

    Your wordpress site is very sleek – hope you don’t mind me asking what theme you’re using?
    (and don’t mind if I steal it? :P)

    I just launched my site –also built in wordpress like yours– but the theme slows (!) the site down quite a bit.

    In case you have a minute, you can find it by searching for “royal cbd” on Google (would appreciate any feedback) – it’s still in the works.

    Keep up the good work– and hope you all take care of yourself during the coronavirus scare!

  2. Hello, i think that i saw you visited my weblog thus i got here to return the
    desire?.I’m trying to in finding things to enhance
    my website!I guess its adequate to make use
    of a few of your ideas!!

  3. Found your article interesting to read. I can’t wait to see your post soon. Good Luck for the upcoming update.This article is
    truly quite interesting and effective.
    Best regards,
    Thomassen Griffin

  4. you are actually a excellent webmaster. The web site
    loading speed is amazing. It seems that you’re doing any distinctive trick.
    In addition, The contents are masterpiece. you have performed a great
    job in this subject!

  5. Simply want to say your article is as astonishing.

    The clearness in your post is just great and i could assume
    you’re an expert on this subject. Fine with your permission let me to grab your RSS feed to keep updated with forthcoming post.
    Thanks a million and please continue the enjoyable work.

  6. Hello buddy,
    I truly enjoy your work and your site is quite interesting.
    I have to appreciate your work andefforts..
    It is incredible.
    King regards,
    Lunding Cannon

  7. My partner and I stumbled over here different page and thought I
    might as well check things out. I like what I see so now i’m following you.
    Look forward to going over your web page yet again.

  8. Pretty nice post. I just stumbled upon your weblog and wanted to mention that I have really enjoyed surfing around your weblog posts.
    In any case I will be subscribing for your rss feed and I’m hoping you write again soon!

  9. Nice post. I used to be checking continuously this weblog and I’m inspired!
    Very useful information specifically the final section 🙂 I
    maintain such info a lot. I was seeking this particular information for
    a very lengthy time. Thank you and best of luck.

  10. Thanks a lot for sharing this with all people you actually recognise what you are speaking approximately!
    Bookmarked. Please also talk over with my site =).
    We may have a hyperlink change arrangement between us

  11. Hey there! I could have sworn I’ve been to this blog before but after checking through some of the post I realized it’s new to me. Anyhow, I’m definitely delighted I found it and I’ll be bookmarking and checking back frequently!

  12. whoah this weblog is excellent i like studying your
    articles. Stay up the great work! You know, many
    persons are searching round for this information, you can help them greatly.

  13. Enjoyed reading the content above, actually explains everything in detail,
    the guide is extremely interesting and effective. Thank
    you and good luck in the articles.
    King regards,
    Thompson Schneider

  14. Thank you for every other fantastic post. Where else may anyone
    get that type of info in such a perfect means of writing?
    I have a presentation next week, and I’m at the search for such information.

  15. all the time i used to read smaller posts which as well clear their motive, and that is also happening with this piece of writing
    which I am reading now.

  16. Hi! This is my first visit to your blog! We are a group of volunteers and starting a new project in a community in the same niche.
    Your blog provided us useful information to work on. You have done a outstanding job!

  17. I am extremely impressed along with your writing skills
    as smartly as with the format for your weblog. Is this a paid subject or did you
    modify it your self? Either way keep up the excellent quality writing, it is rare to peer a nice weblog like this one these days..

  18. I’m truly enjoying the design and layout of
    your site. It’s a very easy on the eyes which makes it much
    more pleasant for me to come here and visit
    more often. Did you hire out a designer to create your theme?
    Exceptional work!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related News

Blockchain Sustainable Development Goals

The sustainable development goals were created in 2012, and blockchain technology was still in its infancy. Few could have predicted the course and potential of blockchain for achieving these lofty goals. However,Read More...
admin | Jul 10, 20220

Mobile App Development Platform

WHAT IS THE BEST MOBILE APP DEVELOPMENT PLATFORM  Using the best mobile app development software makes creating apps for your business easy. This is significant because mobile apps were traditionally associated withRead More...
admin | Jul 5, 20220

On Demand Food Delivery App Development

On Demand Food Delivery App Development In Digital world,Advancement in technology helped many industries to grow and increase their market value. Nowadays, In the market on demand food delivery is most trendingRead More...
redcrixnew | Sep 12, 20200

How to keep your takeaway restaurant customers coming back for more

How to keep your takeaway restaurant customers coming back for more…??? Let me ask you a question. Suppose you want to order dinner. What’s easier? Option 1: Open your web browser DecideRead More...
redcrixnew | Sep 12, 20200