Zak Dyer

Zak Dyer

1566533262

Build Your Own Google Search with Flutter for Web

Originally published by Promise Nzubechi Amadi at https://medium.com

It’s always a privilege to help you upgrade your skillset through my write-ups and tutelage.

Before the end of this writeup, you will learn how to build a Google Search User Interface (UI) using flutter.

Definition: Flutter for web

Flutter for the web is a code-compatible implementation of Flutter that is rendered using standards-based web technologies. This includes: HTML, CSS and JavaScript.

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.

NOTE: For your easy comprehension, this writeup is divided into major three steps.

Step 1:

Create a text for: “Gmail”, “Images”, “Image for dashboard” and “A button for sign-in ” (see image below)

Step 2:

Add an image for “Google ”, then an edit text for “Google Search; a button for “Google Search” and another for “I’m Feeling Lucky”.

Then add text for “Google offered in:Hausa Igbo Èdè YorùbáNigerian Pidgin”. (see image below).

Step 3:

Add text: “ Nigeria”, “ Privacy” “Terms” “Settings” “Advertising” “Business” “About” “How Search Works”. (See image below)

After completing the three-stages, your Google Search UI will look like the image below:

You‘re doing great already!!

Let’s continue.

You can create your Google Search UI using Visual Studio, IntelliJ or Android studio.

Open IntelliJ, click on File>>New>>New Project, Select Dart and choose “Flutter Web App - a simple Flutter Web app”.

Click on “Next

Enter the project name and click on “Finish

When you are done creating your project, Go to the “web folder” create a folder and name it “assets”.

Also, you should create another folder where your images will be kept. This folder will be named: “images”.

While building your Google search, you need two images; the first image is the image that looks like a dashboard and the second image is the Google image.

Add this code to your “main.dart” file

import 'package:flutter_web/material.dart';
import 'footerOptions.dart';
import 'googleMenuOptions.dart';
import 'googleSearch.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
// This widget is the root of your application.

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: MyHomePage(),
theme: ThemeData(
primaryColor: Colors.black,
),
title: ‘Google’,
);
}
}

class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Column(
children: [
//A Flexible widget controls how a child of a Row, Column, or Flex flexes.

        //I gave

        Flexible(
          flex: 1,
          child: GoogleMenuOptions(),
        ),
        Flexible(
          flex: 8,
          child: GoogleSearch(),
        ),
        Flexible(
          flex: 1,
          child: FooterOptions(),
        ),
      ],
    ));

}
}

Create a dart file and name it “googleMenuOptions.dart”. Add this code inside the dart file.

import ‘package:flutter_web/material.dart’;

class GoogleMenuOptions extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
child: Padding(
padding: const EdgeInsets.only(top: 8.0, right: 8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Text(
“Gmail”,
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w300,
fontFamily: ‘arial’),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(“Images”,
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w300,
fontFamily: ‘arial’)),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
‘images/menu1.png’,
fit: BoxFit.cover,
height: 20,
width: 20,
),
),
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 13, bottom: 13),
child: RaisedButton(
elevation: 0.0,
color: Colors.blueAccent,
onPressed: () {},
child: Text(
‘Sign in’,
style: TextStyle(
fontFamily: ‘arial’,
color: Colors.white,
fontSize: 15,
fontWeight: FontWeight.w500),
),
),
)
],
),
),
);
}
}

To test run your project, open “Terminal”

Add this code “flutter packages pub global run webdev serve” to your terminal and press enter.

After building your project, copy the URL: http://127.0.0.1:8080 and paste to your browser.

The website should look like this image below:

The next step is to create another dart file and the name it: “googleSearch.dart”.

Add this code inside the dart file you have created and re-run your project again.

import ‘package:flutter_web/material.dart’;

class GoogleSearch extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
child: Container(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Flexible(
child: Image.asset(
‘images/google.png’,
height: 100,
),
),
SizedBox(
height: 20,
),
Flexible(
child: Container(
width: 500,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(24.0),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.2),
offset: Offset(0.0, 0.5),
blurRadius: 5.0,
spreadRadius: 0.3,
)
],
),
child: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: TextField(
cursorColor: Theme.of(context).primaryColor,
decoration: InputDecoration(
border: InputBorder.none,
contentPadding: const EdgeInsets.symmetric(
horizontal: 12.0, vertical: 13.0),
),
maxLines: 1,
),
),
),
),
SizedBox(
height: 20,
),
Flexible(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(right: 12.0, top: 10),
child: RaisedButton(
elevation: 0.0,
color: Colors.black38.withOpacity(0.1),
onPressed: () {},
child: Text(
“Google Search”,
style: TextStyle(
fontSize: 15.0,
color: Colors.black54,
fontFamily: ‘arial’),
),
),
),
Padding(
padding: const EdgeInsets.only(left: 12.0, top: 10),
child: RaisedButton(
elevation: 0.0,
color: Colors.black26.withOpacity(0.1),
onPressed: () {},
child: Text(
“I’m Feeling Lucky”,
style: TextStyle(
fontWeight: FontWeight.w200,
fontSize: 15.0,
color: Colors.black54,
fontFamily: ‘arial’),
),
),
)
],
)),
Flexible(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(top: 20.0),
child: Text(“Google offered in:”,
style: TextStyle(
color: Colors.black,
fontSize: 13.0,
fontFamily: ‘arial’)),
),
Padding(
padding: const EdgeInsets.only(left: 8.0, top: 20.0),
child: Text(“Hausa”,
style: TextStyle(
color: Colors.indigo,
fontSize: 15.0,
fontFamily: ‘arial’)),
),
Padding(
padding: const EdgeInsets.only(
left: 8.0,
top: 20.0,
),
child: Text(“Igbo”,
style: TextStyle(
color: Colors.indigo,
fontSize: 15.0,
fontFamily: ‘arial’)),
),
Padding(
padding: const EdgeInsets.only(left: 8.0, top: 20.0),
child: Text(“Èdè Yorùbá”,
style: TextStyle(
color: Colors.indigo,
fontSize: 15.0,
fontFamily: ‘arial’)),
),
Padding(
padding: const EdgeInsets.only(left: 8.0, top: 20.0),
child: Text(
“Nigerian Pidgin”,
style: TextStyle(
color: Colors.indigo,
fontSize: 15.0,
fontFamily: ‘arial’),
),
),
],
))
],
),
),
));
}
}

The website will look like the image below:

The final step is to create a dart file and the name it: “footerOptions.dart”.

Add this code inside the dart file you have created and re-run your project again.

import ‘package:flutter_web/material.dart’;

class FooterOptions extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.black26, width: 0.1),
color: Colors.black.withOpacity(0.05),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Flexible(
child: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(
left: 20.0,
top: 8,
),
child: Text(
‘Nigeria’,
style: TextStyle(fontSize: 15, fontFamily: ‘arial’),
),
),
],
),
),
),
Divider(
color: Colors.black.withOpacity(0.1),
),
Flexible(
child: Padding(
padding: const EdgeInsets.only(
left: 20.0,
),
child: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
child: Text(
‘Advertising’,
style: TextStyle(fontSize: 15, fontFamily: ‘arial’),
),
),
Container(
margin: EdgeInsets.only(left: 15),
child: Text(
‘Business’,
style: TextStyle(fontSize: 15, fontFamily: ‘arial’),
),
),
Container(
margin: EdgeInsets.only(left: 15),
child: Text(
‘About’,
style: TextStyle(fontSize: 15, fontFamily: ‘arial’),
),
),
Container(
margin: EdgeInsets.only(left: 15),
child: Text(
‘How Search works’,
style: TextStyle(fontSize: 15, fontFamily: ‘arial’),
),
),
Container(
margin: EdgeInsets.only(left: 15),
child: Text(
‘Privacy’,
style: TextStyle(fontSize: 15, fontFamily: ‘arial’),
),
),
Container(
margin: EdgeInsets.only(left: 15),
child: Text(
‘Terms’,
style: TextStyle(fontSize: 15, fontFamily: ‘arial’),
),
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Text(
‘Settings’,
style: TextStyle(fontSize: 15, fontFamily: ‘arial’),
),
),
]…insert(4, const Spacer()),
),
),
),
),
],
),
);
}
}

Congratulations!!! You have successfully built your Google Search UI.

P.S: Here is the source code for the project you just worked on.

Thanks for reading

If you liked this post, share it with all of your programming buddies!

Follow us on Facebook | Twitter

Further reading

Learn Flutter & Dart to Build iOS & Android Apps

Flutter & Dart - The Complete Flutter App Development Course

Dart and Flutter: The Complete Developer’s Guide

Flutter - Advanced Course

Flutter Tutorial - Flight List UI Example In Flutter

Flutter Tutorial for Beginners - Full Tutorial

Using Go Library in Flutter

A Beginners Guide to the Flutter Bottom Sheet

Flutter Course - Full Tutorial for Beginners (Build iOS and Android Apps)

Flutter Tutorial For Beginners - Build Your First Flutter App

Building the SwiftUI Sample App in Flutter

Building Cryptocurrency Pricing App with Flutter

Build a CRUD app using Firebase and Flutter (Provider)

Build Firestore Todo App in flutter using “flutter_bloc”

#flutter #mobile-apps #web-development

What is GEEK

Buddha Community

Build Your Own Google Search with Flutter for Web

Google's Flutter 1.20 stable announced with new features - Navoki

Flutter Google cross-platform UI framework has released a new version 1.20 stable.

Flutter is Google’s UI framework to make apps for Android, iOS, Web, Windows, Mac, Linux, and Fuchsia OS. Since the last 2 years, the flutter Framework has already achieved popularity among mobile developers to develop Android and iOS apps. In the last few releases, Flutter also added the support of making web applications and desktop applications.

Last month they introduced the support of the Linux desktop app that can be distributed through Canonical Snap Store(Snapcraft), this enables the developers to publish there Linux desktop app for their users and publish on Snap Store.  If you want to learn how to Publish Flutter Desktop app in Snap Store that here is the tutorial.

Flutter 1.20 Framework is built on Google’s made Dart programming language that is a cross-platform language providing native performance, new UI widgets, and other more features for the developer usage.

Here are the few key points of this release:

Performance improvements for Flutter and Dart

In this release, they have got multiple performance improvements in the Dart language itself. A new improvement is to reduce the app size in the release versions of the app. Another performance improvement is to reduce junk in the display of app animation by using the warm-up phase.

sksl_warm-up

If your app is junk information during the first run then the Skia Shading Language shader provides for pre-compilation as part of your app’s build. This can speed it up by more than 2x.

Added a better support of mouse cursors for web and desktop flutter app,. Now many widgets will show cursor on top of them or you can specify the type of supported cursor you want.

Autofill for mobile text fields

Autofill was already supported in native applications now its been added to the Flutter SDK. Now prefilled information stored by your OS can be used for autofill in the application. This feature will be available soon on the flutter web.

flutter_autofill

A new widget for interaction

InteractiveViewer is a new widget design for common interactions in your app like pan, zoom drag and drop for resizing the widget. Informations on this you can check more on this API documentation where you can try this widget on the DartPad. In this release, drag-drop has more features added like you can know precisely where the drop happened and get the position.

Updated Material Slider, RangeSlider, TimePicker, and DatePicker

In this new release, there are many pre-existing widgets that were updated to match the latest material guidelines, these updates include better interaction with Slider and RangeSliderDatePicker with support for date range and time picker with the new style.

flutter_DatePicker

New pubspec.yaml format

Other than these widget updates there is some update within the project also like in pubspec.yaml file format. If you are a flutter plugin publisher then your old pubspec.yaml  is no longer supported to publish a plugin as the older format does not specify for which platform plugin you are making. All existing plugin will continue to work with flutter apps but you should make a plugin update as soon as possible.

Preview of embedded Dart DevTools in Visual Studio Code

Visual Studio code flutter extension got an update in this release. You get a preview of new features where you can analyze that Dev tools in your coding workspace. Enable this feature in your vs code by _dart.previewEmbeddedDevTools_setting. Dart DevTools menu you can choose your favorite page embed on your code workspace.

Network tracking

The updated the Dev tools comes with the network page that enables network profiling. You can track the timings and other information like status and content type of your** network calls** within your app. You can also monitor gRPC traffic.

Generate type-safe platform channels for platform interop

Pigeon is a command-line tool that will generate types of safe platform channels without adding additional dependencies. With this instead of manually matching method strings on platform channel and serializing arguments, you can invoke native class and pass nonprimitive data objects by directly calling the Dartmethod.

There is still a long list of updates in the new version of Flutter 1.2 that we cannot cover in this blog. You can get more details you can visit the official site to know more. Also, you can subscribe to the Navoki newsletter to get updates on these features and upcoming new updates and lessons. In upcoming new versions, we might see more new features and improvements.

You can get more free Flutter tutorials you can follow these courses:

#dart #developers #flutter #app developed #dart devtools in visual studio code #firebase local emulator suite in flutter #flutter autofill #flutter date picker #flutter desktop linux app build and publish on snapcraft store #flutter pigeon #flutter range slider #flutter slider #flutter time picker #flutter tutorial #flutter widget #google flutter #linux #navoki #pubspec format #setup flutter desktop on windows

Terry  Tremblay

Terry Tremblay

1598396940

What is Flutter and why you should learn it?

Flutter is an open-source UI toolkit for mobile developers, so they can use it to build native-looking** Android and iOS** applications from the same code base for both platforms. Flutter is also working to make Flutter apps for Web, PWA (progressive Web-App) and Desktop platform (Windows,macOS,Linux).

flutter-mobile-desktop-web-embedded_min

Flutter was officially released in December 2018. Since then, it has gone a much stronger flutter community.

There has been much increase in flutter developers, flutter packages, youtube tutorials, blogs, flutter examples apps, official and private events, and more. Flutter is now on top software repos based and trending on GitHub.

Flutter meaning?

What is Flutter? this question comes to many new developer’s mind.

humming_bird_dart_flutter

Flutter means flying wings quickly, and lightly but obviously, this doesn’t apply in our SDK.

So Flutter was one of the companies that were acquired by **Google **for around $40 million. That company was based on providing gesture detection and recognition from a standard webcam. But later when the Flutter was going to release in alpha version for developer it’s name was Sky, but since Google already owned Flutter name, so they rename it to Flutter.

Where Flutter is used?

Flutter is used in many startup companies nowadays, and even some MNCs are also adopting Flutter as a mobile development framework. Many top famous companies are using their apps in Flutter. Some of them here are

Dream11

Dream11

NuBank

NuBank

Reflectly app

Reflectly app

Abbey Road Studios

Abbey Road Studios

and many more other apps. Mobile development companies also adopted Flutter as a service for their clients. Even I was one of them who developed flutter apps as a freelancer and later as an IT company for mobile apps.

Flutter as a service

#dart #flutter #uncategorized #flutter framework #flutter jobs #flutter language #flutter meaning #flutter meaning in hindi #google flutter #how does flutter work #what is flutter

Punith Raaj

1644991598

The Ultimate Guide To Tik Tok Clone App With Firebase - Ep 2

The Ultimate Guide To Tik Tok Clone App With Firebase - Ep 2
In this video, I'm going to show you how to make a Cool Tik Tok App a new Instagram using Flutter,firebase and visual studio code.

In this tutorial, you will learn how to Upload a Profile Pic to Firestore Data Storage.

🚀 Nice, clean and modern TikTok Clone #App #UI made in #Flutter⚠️

Starter Project : https://github.com/Punithraaj/Flutter_Tik_Tok_Clone_App/tree/Episode1

► Timestamps 
0:00 Intro 0:20 
Upload Profile Screen 
16:35 Image Picker
20:06 Image Cropper 
24:25 Firestore Data Storage Configuration.

⚠️ IMPORTANT: If you want to learn, I strongly advise you to watch the video at a slow speed and try to follow the code and understand what is done, without having to copy the code, and then download it from GitHub.

► Social Media 
GitHub: https://github.com/Punithraaj/Flutter_Tik_Tok_Clone_App.git
LinkedIn: https://www.linkedin.com/in/roaring-r...
Twitter: https://twitter.com/roaringraaj
Facebook: https://www.facebook.com/flutterdartacademy

► Previous Episode : https://youtu.be/QnL3fr-XpC4
► Playlist: https://youtube.com/playlist?list=PL6vcAuTKAaYe_9KQRsxTsFFSx78g1OluK

I hope you liked it, and don't forget to like,comment, subscribe, share this video with your friends, and star the repository on GitHub!
⭐️ Thanks for watching the video and for more updates don't forget to click on the notification. 
⭐️Please comment your suggestion for my improvement. 
⭐️Remember to like, subscribe, share this video, and star the repo on Github :)

Hope you enjoyed this video!
If you loved it, you can Buy me a coffee : https://www.buymeacoffee.com/roaringraaj

LIKE & SHARE & ACTIVATE THE BELL Thanks For Watching :-)
 
https://youtu.be/F_GgZVD4sDk

#flutter tutorial - tiktok clone with firebase #flutter challenge @tiktokclone #fluttertutorial firebase #flutter firebase #flutter pageview #morioh #flutter

Punith Raaj

1640672627

Flutter Hotel Booking UI - Book your Stay At A New Hotel With Flutter - Ep1

https://youtu.be/-tHUmjIkGJ4
Flutter Hotel Booking UI - Book your Stay At A New Hotel With Flutter - Ep1
#flutter #fluttertravelapp #hotelbookingui #flutter ui design 

In this video, I'm going to show you how to make a Cool Hotel Booking App using Flutter and visual studio code. 

In this tutorial, you will learn how to create a Splash Screen and Introduction Screen, how to implement a SmoothPageIndicator in Flutter. 

🚀 Nice, clean and modern Hotel Booking #App #UI made in #Flutter 

⚠️ IMPORTANT: If you want to learn, I strongly advise you to watch the video at a slow speed and try to follow the code and understand what is done, without having to copy the code, and then download it from GitHub. 

► Social Media 

    GitHub: https://github.com/Punithraaj 

    LinkedIn: https://www.linkedin.com/in/roaring-r...

    Twitter: https://twitter.com/roaringraaj

    Facebook: https://www.facebook.com/flutterdartacademy

I hope you liked it, and don't forget to like,comment, subscribe, share this video with your friends, and star the repository on GitHub! 

⭐️ Thanks for watching the video and for more updates don't forget to click on the notification.⭐️Please comment your suggestion for my improvement. ⭐️Remember to like, subscribe, share this video, and star the repo on Github :)Hope you enjoyed this video! If you loved it, you can Buy me a coffee : https://www.buymeacoffee.com/roaringraaj

#flutter riverpod #flutter travel app #appointment app flutter #morioh

Adobe XD plugin for Flutter with CodePen Tutorial

Recently Adobe XD releases a new version of the plugin that you can use to export designs directly into flutter widgets or screens. Yes, you read it right, now you can make and export your favorite design in Adobe XD and export all the design in the widget form or as a full-screen design, this can save you a lot of time required in designing.

What we will do?
I will make a simple design of a dialogue box with a card design with text over it as shown below. After you complete this exercise you can experiment with the UI. You can make your own components or import UI kits available with the Adobe XD.

#developers #flutter #adobe xd design export to flutter #adobe xd flutter code #adobe xd flutter code generator - plugin #adobe xd flutter plugin #adobe xd flutter plugin tutorial #adobe xd plugins #adobe xd to flutter #adobe xd tutorial #codepen for flutter.