Coding Flutter
Flutter: Basic App Bar
November 19, 2019
0
,

lib/main.dart

import 'package:flutter/material.dart';

void main() {
  runApp(BasicAppbar());
}

class BasicAppbar extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        home: Scaffold(
            appBar: AppBar(
              //  backgroundColor: Colors.white,
              leading: Padding(
                padding: EdgeInsets.only(left: 12),
                child: IconButton(
                  icon: Icon(Icons.list),
                  onPressed: () {
                    print('Click leading');
                  },
                ),
              ),
              title: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children:[
                   Text('Basic AppBar'),
                ]
              ),
              actions: [
                IconButton(
                  icon: Icon(Icons.search),
                  onPressed: () {
                    print('Click search');
                  },
                ),
                IconButton(
                  icon: Icon(Icons.star),
                  onPressed: () {
                    print('Click start');
                  },
                ),
              ],
              
            ),
            body: Container(
              decoration: BoxDecoration(color: Colors.grey),
            )));
  }
}

About author

ZERIN

CEO & Founder (BdBooking.com - Online Hotel Booking System), CEO & Founder (TaskGum.com - Task Managment Software), CEO & Founder (InnKeyPro.com - Hotel ERP), Software Engineer & Solution Architect

How do i install older version of CI4 using composer

Sometimes when you run git update & composer u...

Read more

hitpath API: Read Affiliates Record

<?php $offset = 0; $limit = 10; $url = "http://...

Read more

hitpath API: Read Campaigns Record

<?php $offset = 0; $limit = 10; $url = "http://...

Read more

There are 0 comments

Leave a Reply

Your email address will not be published. Required fields are marked *