Quantcast
Channel: How to create a custom AppBar widget? - Stack Overflow
Viewing all articles
Browse latest Browse all 9

Answer by riftninja for How to create a custom AppBar widget?

$
0
0
import 'package:flutter/material.dart';class CustomAppBar extends StatefulWidget implements PreferredSizeWidget {    CustomAppBar({Key key}) : preferredSize = Size.fromHeight(kToolbarHeight), super(key: key);    @override    final Size preferredSize; // default is 56.0    @override    _CustomAppBarState createState() => _CustomAppBarState();}class _CustomAppBarState extends State<CustomAppBar>{    @override    Widget build(BuildContext context) {        return AppBar( title: Text("Sample App Bar") );    }}

Hopefully this helps


Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>