Flutter UI #2: Fun With AppBar in Flutter


Flutter UI #2: Fun With AppBar in Flutter
Flutter UI #2: Fun With AppBar in Flutter

AppBar is the widget in flutter which contains toolbar in particular flutter application. AppBar which is auto fixed toolbar at the top of the mobile screen. 

In AppBar, we can create different toolbar widgets like actions, menu button, icon buttons and more. 

import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
  const MyApp({Key key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: MyStatelessWidget(),
    );
  }
}
class MyStatelessWidget extends StatelessWidget {
  const MyStatelessWidget({Key key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('AppBar Demo'),
      ),
      body: null,
    );
  }
}

Leave a Reply

Your email address will not be published.