This is a flutter Swipe Tabs tutorial.

We will have 6 Tabs in our application. The Tabs will be arranged beautifully in our appBar just below the title.

Each tab will have the tab title and icon. You can then click the tab or swipe it either from left to right or right to left.

Our TabViews will have Cards.Each Card will have an image and text.

This is a flutter GridView tutorial.

A GridView is a scrollable, 2D array of widgets.

The main axis direction of a grid is the direction in which it scrolls (the scrollDirection).

The most commonly used grid layouts are GridView.count, which creates a layout with a fixed number of tiles in the cross axis, andGridView.extent, which creates a layout with tiles that have a maximum cross-axis extent. A custom SliverGridDelegate can produce an arbitrary 2D arrangement of children, including arrangements that are unaligned or overlapping.

To create a grid with a large (or infinite) number of children, use the GridView.builder constructor with either a SliverGridDelegateWithFixedCrossAxisCount or a SliverGridDelegateWithMaxCrossAxisExtent for the gridDelegate.

To use a custom SliverChildDelegate, use GridView.custom.

To create a linear array of children, use a ListView.

To control the initial scroll offset of the scroll view, provide a controller with its ScrollController.initialScrollOffset property set.

new GridView.count(
  primary: false,
  padding: const EdgeInsets.all(20.0),
  crossAxisSpacing: 10.0,
  crossAxisCount: 2,
  children: <Widget>[
    const Text('He\'d have you all unravel at the'),
    const Text('Heed not the rabble'),
    const Text('Sound of screams but the'),
    const Text('Who scream'),
    const Text('Revolution is coming...'),
    const Text('Revolution, they...'),
  ],
)

Flutter AlertDialog Tutorial and example.

An alert dialog informs the user about situations that require acknowledgement.

CupertinoAlertDialog An iOS-style alert dialog.

Generally we utilize an alert dialog to tell the user about situations that need user attention or acknowledgement.

AlertDialogs can have the following:

  1. Title(Optional) - displayed above content
  2. Content(Optional) - displayed between content and list of actions.
  3. List of actions(Optional) - displayed below the content
  4. The title is displayed above the content and the actions are displayed below the content.

CupertinoAlertDialogs do style their titles and content (typically a message) to match the standard iOS title and message dialog text style.

However you can overridde these by explicitly defining TextStyles for Text widgets that are part of the title or content.

To display action buttons that look like standard iOS dialog buttons, provide CupertinoDialogActions for the actions given to this dialog.

CupertinoAlertDialog is typically passed as the child widget to showDialog, which displays the dialog.

This is a flutter ListView tutorial.

A ListView is a scrollable list of widgets arranged linearly.

As the names suggests it's responsibility is list items. These items can then scrolled. ListView isn't the only scrolling view. There are others like gridview, however ListView is the most commonly used.

ListView will display its children one after another in the scroll direction. In the cross axis, the children are required to fill the ListView.

Here's a simple infinite listview:

new ListView.builder(
  padding: new EdgeInsets.all(8.0),
  itemExtent: 20.0,
  itemBuilder: (BuildContext context, int index) {
    return new Text('entry $index');
  },
)

BuildContext is an abstract class acting as a handle to the location of a widget in the widget tree.

abstract class BuildContext

It's defined in the flutter package.

It's role as an abstract class is to hold a set of methods. These methods can be used from StatelessWidget.build methods and from methods on State objects.

Normally when you are using widget builder functions like the build() method of the StatelessWidget class.

For instance here's a BuildContext object being passed to the build() method of a StatelessWidget subclass:

 @override
  Widget build(BuildContext context) {
    return MaterialApp()

This is a Flutter Android SnackBar Tutorial and Example.

SnackBar is a lightweight message with an optional action which briefly displays at the bottom of the screen.

SnakBars are important as they allows us show quick notifications for a short period of time without requiring user intervention.

However uses can also act by clicking the action button which can be rendered in the SnackBar.

Displaying a snackbar is easy. You simply invoke the Scaffold.of(context).showSnackBar(), passing an instance of SnackBar that describes the message.

You can also provide your own custom duration for displaying the SnackBar.

A SnackBar with an action will not time out when TalkBack or VoiceOver are enabled. This is controlled by AccessibilityFeatures.accessibleNavigation.

Widget is an abstract class for Flutter that describes the configuration for an Element.

A widget is an immutable description of part of a user interface.

Widget derives from the DiagnosticableTree class

abstract class Widget extends DiagnosticableTree

and is defined in the flutter package.

Widgets are very important to the way Flutter Framework works and is the central class hierarchy in Flutter.

You can inflate Widgets into elements. Those elements then become responsible for the management of the underlying render tree.

Widgets themselves have no mutable state (all their fields must be final).

However you can associate a mutable state with a widget. In that case you can use the StatefulWidget class, which will then create a State object via StatefulWidget.createState whenever it is inflated into an element and incorporated into the tree.