Saturday, 31 August 2019

A shopper Flutter app that use BloC pattern and CRUD operations with different ways



utter-design-pattern

The project is maintained by a non-profit organisation, along with an amazing collections of Flutter samples. We're trying to make continuous commits for changes along with the Flutter tech progress.

Goals for this sample

  • Shows a state management approach using the Provider package,mainly use StreamProvider and ChangeNotifier.
  • Show a logic for fetch data from different datasources as above graph.

Memory fetch data

Change repositories/catalog.dart
const dataSource = 'memory';
repositories/catalog.dart A route distribution for fetching data
memory/catalog.dart All CURD operations will be here
file/catalog.dart Define data

Sqlite fetch data

Change repositories/catalog.dart
const dataSource = 'db';

Notice

You can't use cart.items.contains(item) to compare catalog whether exists in cart,because use database reload data.Add contains method in cart controller,and use below
cart.contains(item.id)

Todo

  • Http implement

Screen Shots





GitHub

A shopper Flutter app that use BloC pattern and CRUD operations with different ways(memory/sqlite/http) — Read More
Latest commit to the master branch on 8-31-2019
Download as zip

Contains example of problematic layout

Friday, 30 August 2019

Time Picker widget with spinner instead of a material time picker



flutter_time_picker_spinner

A Flutter widget to set time with spinner instead of material time picker.
12H format


24H format


24H format with second


Custom style


Getting Started

This project is a starting point for a Dart
package,
a library module containing code that can be shared easily across
multiple Flutter or Dart projects.
For help getting started with Flutter, view our
online documentation, which offers tutorials,
samples, guidance on mobile development, and a full API reference.

Props

PROPSTYPESDEFAULTVALUES
timeDateTimeCurrent Time [ DateTime.now() ]
minutesIntervalint1
secondsIntervalint1
is24HourModebooltrue
isShowSecondsboolfalse
isShowSecondsboolfalse
highlightedTextStyleTextStylefalse
normalTextStyleTextStylefalse
itemHeightdouble60.0
itemWidthdouble45.0
spacingdouble20.0
alignmentAlignmentGeometryAlignment.centerRight
isForce2Digitsboolfalse
onTimeChangeTimePickerCallback

Usage

import 'package:flutter_time_picker_spinner/flutter_time_picker_spinner.dart';

Widget widget() {
  return new TimePickerSpinner(
    is24HourMode: false,
    normalTextStyle: TextStyle(
      fontSize: 24,
      color: Colors.deepOrange
    ),
    highlightedTextStyle: TextStyle(
      fontSize: 24,
      color: Colors.yellow
    ),
    spacing: 50,
    itemHeight: 80,
    isForce2Digits: true,
    onTimeChange: (time) {
      setState(() {
        _dateTime = time;
      });
    },
  );
}
Dart

GitHub

A Flutter widget to set time with spinner instead of material time picker — Read More
Latest commit to the master branch on 8-29-2019
Download as zip







An App to capture details about folks interested in joining Publicis Sapient



photo_job

A simple app to take in candidate applications at a Conference Booth. This simplifies the work for a recruiter and eliminates the paper work that was present earlier. It also makes the process fun for the candidate by taking a selfie with the Job Profile.

GitHub

An App to capture details about folks interested in joining Publicis Sapient. Especially useful at events! — Read More
Latest commit to the master branch on 8-29-2019
Download as zip

A Custom Extended Scaffold with Expandable and Floating Navigation Bar



extended_navbar_scaffold

Custom Flutter widgets that makes Bottom Navigation Floating and can be expanded with much cleaner and easier way.

Installing

Add the following to your pubspec.yaml file:
dependencies:
  extended_navbar_scaffold: any

Creating

ExtendedNavigationBarScaffold(
  body: Container(
    color: Colors.deepOrange,
  ),
  elevation: 0,
  floatingAppBar: true,
  appBar: AppBar(
    shape: kAppbarShape,
    leading: IconButton(
      icon: Icon(
        EvaIcons.person,
        color: Colors.black,
      ),
      onPressed: () {},
    ),
    title: Text(
      'Extended Scaffold Example',
      style: TextStyle(color: Colors.black),
    ),
    centerTitle: true,
    backgroundColor: Colors.white,
  ),
  navBarColor: Colors.white,
  navBarIconColor: Colors.black,
  moreButtons: [
    MoreButtonModel(
      icon: MaterialCommunityIcons.wallet,
      label: 'Wallet',
      onTap: () {},
    ),
    MoreButtonModel(
      icon: MaterialCommunityIcons.parking,
      label: 'My Bookings',
      onTap: () {},
    ),
    MoreButtonModel(
      icon: MaterialCommunityIcons.car_multiple,
      label: 'My Cars',
      onTap: () {},
    ),
    MoreButtonModel(
      icon: FontAwesome.book,
      label: 'Transactions',
      onTap: () {},
    ),
    MoreButtonModel(
      icon: MaterialCommunityIcons.home_map_marker,
      label: 'Offer Parking',
      onTap: () {},
    ),
    MoreButtonModel(
      icon: FontAwesome5Regular.user_circle,
      label: 'Profile',
      onTap: () {},
    ),
    null,
    MoreButtonModel(
      icon: EvaIcons.settings,
      label: 'Settings',
      onTap: () {},
    ),
    null,
  ],
  searchWidget: Container(
    height: 50,
    color: Colors.redAccent,
  ),
  // onTap: (button) {},
  // currentBottomBarCenterPercent: (currentBottomBarParallexPercent) {},
  // currentBottomBarMorePercent: (currentBottomBarMorePercent) {},
  // currentBottomBarSearchPercent: (currentBottomBarSearchPercent) {},
  parallexCardPageTransformer: PageTransformer(
    pageViewBuilder: (context, visibilityResolver) {
      return PageView.builder(
        controller: PageController(viewportFraction: 0.85),
        itemCount: parallaxCardItemsList.length,
        itemBuilder: (context, index) {
          final item = parallaxCardItemsList[index];
          final pageVisibility =
              visibilityResolver.resolvePageVisibility(index);
          return ParallaxCardsWidget(
            item: item,
            pageVisibility: pageVisibility,
          );
        },
      );
    },
  ),
);

Screenshots

Implementation



Widget Demo




GitHub

A Custom Extended Scaffold with Expandable and Floating Navigation Bar — Read More
Latest commit to the master branch on 8-28-2019
Download as zip