A Gmail Clone built with Flutter

Overview

gmail_clone

A new Flutter application to showcase how to build Gmail with Flutter.

Video Tutorial: YouTube

Screenshots

listview

details

tablet

selection

Example

import 'package:floating_search_bar/floating_search_bar.dart';
import 'package:flutter/material.dart';
import 'package:gmail_clone/ui/app/app.dart';
import 'package:responsive_scaffold/responsive_scaffold.dart';
import 'package:responsive_scaffold/utils/breakpoint.dart';

import '../data/classes/email.dart';
import '../data/dummy_data.dart';
import 'common/common.dart';

class HomeScreen extends StatefulWidget {
  @override
  _HomeScreenState createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  List<EmailItem> _emails;
  @override
  void initState() {
    _emails = emails;
    super.initState();
  }

  final Size _tabletBreakpoint = Size(510.0, 510.0);

  @override
  Widget build(BuildContext context) {
    final bool _tablet = isTablet(context, breakpoint: _tabletBreakpoint);
    return ResponsiveScaffold.builder(
      tabletBreakpoint: _tabletBreakpoint,
      detailBuilder: (BuildContext context, int index) {
        final i = _emails[index];
        return DetailsScreen(
          appBar: AppBar(
            elevation: 0.0,
            actions: [
              IconButton(
                icon: Icon(Icons.archive),
                onPressed: () {},
              ),
              IconButton(
                icon: Icon(Icons.delete_outline),
                onPressed: () {
                  setState(() {
                    _emails.removeAt(index);
                  });
                },
              ),
              IconButton(
                icon: Icon(Icons.mail_outline),
                onPressed: () {},
              ),
              IconButton(
                icon: Icon(Icons.more_horiz),
                onPressed: () {},
              ),
            ],
          ),
          body: EmailView(
            item: i,
            favoriteChanged: () {
              setState(() {
                i.favorite = !i.favorite;
              });
            },
          ),
        );
      },
      drawer: AppDrawer(),
      tabletSideMenu: _tablet
          ? Flexible(
              flex: 1,
              child: AppSideMenu(),
            )
          : null,
      tabletFlexListView: 4,
      slivers: <Widget>[
        SliverFloatingBar(
          floating: true,
          automaticallyImplyLeading: !_tablet,
          title: TextField(
            decoration: InputDecoration.collapsed(hintText: "Search mail"),
          ),
          trailing: CircleAvatar(
            child: Text("RD"),
          ),
        ),
        SliverToBoxAdapter(
          child: Container(
            padding: EdgeInsets.all(12.0),
            child: Text("All Inboxes"),
          ),
        ),
      ],
      itemCount: _emails?.length ?? 0,
      itemBuilder: (BuildContext context, int index) {
        final i = _emails[index];
        final bool _lastItem = (index + 1) == emails?.length ?? 0;
        if (_lastItem) {
          return Container(
            padding: EdgeInsets.only(bottom: 70.0),
            child: EmailListTile(
              item: i,
              favoriteChanged: () {
                setState(() {
                  i.favorite = !i.favorite;
                });
              },
            ),
          );
        }
        return EmailListTile(
          item: i,
          favoriteChanged: () {
            setState(() {
              i.favorite = !i.favorite;
            });
          },
        );
      },
      floatingActionButton: EmailFAB(),
    );
  }
}
You might also like...

Flutter-Udemy - - A Udemy clone using Flutter sdk and dart.

Flutter-Udemy - - A Udemy clone using Flutter sdk and dart.

udemy_clone A new Flutter project. Below are some images : Getting Started This project is a starting point for a Flutter application. A few resources

Apr 24, 2022

Flutter-meet - A Google Meet clone made in Flutter using 100ms

Flutter-meet - A Google Meet clone made in Flutter using 100ms

Flutter x Meet - Google Meet clone made in Flutter Google Meet clone made in Flu

Nov 30, 2022

Bimono-Flutter - Bimono is flutter UI Clone from Binomo Trading Application

flutter_bimono_clone A new Flutter project. Getting Started When you running in

Nov 6, 2022

Whatsapp UI clone made with Flutter; it is compatible with any type of Android and iOS devices.

whats_app Whatsapp UI built with Flutter; it is compatible and responsive with any type of Android and iOS devices. Getting Started This project is a

Sep 23, 2021

YouTube Clone - Frontend in Flutter

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

Nov 4, 2021

Code With Andrea Home Page - Flutter Clone

Code With Andrea Home Page - Flutter Clone

Code With Andrea - Flutter Clone This project is a Flutter clone of the home page at codewithandrea.com. It was built to analyze the performance of th

Dec 28, 2022

"Jetpack Compose Samples" clone with flutter.

flutter-compose-clones "Jetpack Compose Samples" clone with flutter. Todo jetnews jetchat jetsurvey jetsnack jetcaster Rally Crane Owl License MIT Lic

Nov 4, 2021

new 2021 working Instagram clone written in Flutter

new 2021 working Instagram clone written in Flutter

instagram_ui Instagram 2021 clone made using flutter Contains reels, search grid view, Getting Started This project is a starting point for a Flutter

Nov 6, 2022

(Full-stack) Fully functional social media app (Instagram clone) written in flutter and dart with backend node.js and Postgres SQL.

(Full-stack) Fully functional social media app (Instagram clone) written in flutter and dart with backend node.js and Postgres SQL.

Photoarc A Fully functional social media app written in flutter and dart using node.js and Postgres SQL as backend. Backend Repository Demo Download t

Jan 5, 2023
Comments
  • The argument type 'DetailsScreen Function(BuildContext, int)' can't be assigned to the parameter type 'DetailsScreen Function(BuildContext, int, bool)'.dart(argument_type_not_assignable)

    The argument type 'DetailsScreen Function(BuildContext, int)' can't be assigned to the parameter type 'DetailsScreen Function(BuildContext, int, bool)'.dart(argument_type_not_assignable)

    The argument type 'DetailsScreen Function(BuildContext, int)' can't be assigned to the parameter type 'DetailsScreen Function(BuildContext, int, bool)'.dart(argument_type_not_assignable)

    home.dart file line 33

    @override Widget build(BuildContext context) { final bool _tablet = isTablet(context, breakpoint: _tabletBreakpoint); return ResponsiveScaffold.builder( tabletBreakpoint: _tabletBreakpoint, // detailBuilder: (BuildContext context, int index) { final i = _emails[index]; return DetailsScreen( appBar: AppBar( elevation: 0.0, Screenshot 2020-03-01 at 9 26 14 PM

    opened by MassiveSuccess 1
  • server

    server

    BTW i am looking to take your gmail clone flutter and get it working with Gmail API. https://developers.google.com/gmail/api/quickstart/go#step_3_set_up_the_sample

    • its rest

    And also pure golang email server that preserves privacy. https://github.com/spilled-ink/spilld

    • its imap, smpt, pop.

    I think the first thing is to get oAuth2 working. https://github.com/codeing-io/FlutterOAuth

    • seems to be a very nice abstraction
    opened by ghost 2
  • run error

    run error

    Launching lib/main.dart on iPhone 8 in debug mode...

    Compiler message: file:///Users/mengyueping/flutter/.pub-cache/hosted/pub.dartlang.org/responsive_scaffold-0.0.2/lib/responsive_scaffold.dart:141:9: Error: No named parameter with the name 'extendBody'. extendBody: extendBody, ^^^^^^^^^^ file:///Users/mengyueping/flutter/packages/flutter/lib/src/material/scaffold.dart:783:9: Context: Found this candidate, but the arguments don't match. const Scaffold({ ^ file:///Users/mengyueping/flutter/.pub-cache/hosted/pub.dartlang.org/responsive_scaffold-0.0.2/lib/responsive_scaffold.dart:174:7: Error: No named parameter with the name 'extendBody'. extendBody: extendBody, ^^^^^^^^^^ file:///Users/mengyueping/flutter/packages/flutter/lib/src/material/scaffold.dart:783:9: Context: Found this candidate, but the arguments don't match. const Scaffold({ ^ Compiler failed on /Users/mengyueping/flutter_project/gmail_clone/lib/main.dart Error launching application on iPhone 8.

    bug 
    opened by stayfoo 5
Owner
Rody Davis
Developer Advocate for @material-components at @Google
Rody Davis
Wordle clone flutter - Wordle clone built with flutter

Wordle Generated by the Very Good CLI ?? A Very Good Project created by Very Goo

Oscar 4 Jun 7, 2022
Netflix clone flutter - A clone of netflix UI Built with flutter

Netflix Clone Ui Projeto onde foi criado um clone da interface da Netflix para m

null 4 Aug 18, 2022
Instagram-clone - Instagram clone built using flutter and Firebase

Instagram-clone statistics of Firebase usage User Authentication for Instagram l

null 5 Jul 18, 2022
Instagram clone built using flutter and firebase

instagram_clone An instagram clone built using Flutter and Firebase. Introduction Flutter is a develpment kit created by google using which you can bu

Nadeem Choudhary 3 Jun 8, 2022
YouTube Music Clone Built With Flutter

YouTube Music A part of a #100flutterprojects. Lets spot the difference ?? class YouTubeMusic_clone extends 100flutterprojects { video() { retur

Akindoyin Faruq 6 Dec 29, 2022
Youtubeclone - Youtube Clone UI Built With Flutter supports all platforms

Youtube Clone Flutter Youtube Clone UI supports all platforms. UI youtube.clone.

Aderoju Israel 1 Jun 23, 2022
Job-App - Linkedin Clone app built with flutter

linkedin_clone Linkedin_Clone app Android Mobile Application Screenshot Home Adm

null 4 Sep 13, 2022
A working Twitter clone built in Flutter using Firebase auth,realtime,firestore database and storage.

Fwitter - Twitter clone in flutter A working Twitter clone built in Flutter using Firebase auth,realtime,firestore database and storage. Dependencies

Dominique Rwema Bagirishya 31 Oct 5, 2022
Responsive Full Stack Reddit Clone - Works on Android, iOS & Web! built with Flutter 🚀💙

?? ??️ ?? ??️ ?? ??️ ?? ??️ UNDER CONSTRUCTION ?? ??️ ?? ??️ ?? ??️ ?? ??️ Reddit Clone ?? ?? Responsive Full Stack Reddit Clone - Works on Android, i

SOLOMON ABUH 3 Dec 15, 2022
This is a HubSpot clone Application built with DhiWise. It uses HubSpot APIs to store and retrieve data.

HubSpot A Flutter Application, Built with ❤️ from DhiWise This is a HubSpot clone Application built with Flutter. It uses HubSpot APIs to store and re

DhiWise 4 Nov 27, 2022