drawer

drawer

MaterialApp({ title,theme, home: Scaffold({ appBar, body, floatingActionButton, floatingActionButtonLocation, floatingActionButtonAnimator, persistentFooterButtons, drawer, endDrawer, bottomNavigationBar, bottomSheet, backgroundColor, resizeToAvoidBottomPadding, resizeToAvoidBottomInset }), }) 

açıklama

Açılabilir menu tanımlar.

konum

MaterialApp({ title,theme, home: Scaffold({ appBar, body, drawer,...}), })
 

parametreler

MaterialApp({ 
				title,
				theme,
				home: Scaffold({ 
									appBar,
									body, 
									floatingActionButton,
									floatingActionButtonLocation,
									floatingActionButtonAnimator,
									persistentFooterButtons,
									drawer,
									endDrawer,
									bottomNavigationBar,
									bottomSheet,
									backgroundColor,
									resizeToAvoidBottomPadding,
									resizeToAvoidBottomInset..
							    }),
			})
 

örnek uygulama

nawigationdraver
 
import 'package:flutter/material.dart';


void main() => runApp( MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return  MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Flutter Application"),
      ),
      drawer: Drawer(
        child: ListView(
          children: Widget[
            new UserAccountsDrawerHeader(
              accountEmail: Text("vishumadaan25@gmail.com"),
              accountName: Text("Vishu Madaan"),
              currentAccountPicture:  CircleAvatar(
                backgroundColor: Colors.white,
                child:  Text("V"),
              ),
            ),
             ListTile(
              title: Text("Home"),
              trailing: Icon(Icons.home),
            ),
             ListTile(
              title: Text("Create Account"),
              trailing: Icon(Icons.supervised_user_circle),
            ),
             Divider(height: 5.0),
             ListTile(
              title: Text("Settings"),
              trailing: Icon(Icons.settings),
            )
          ],
        ),
      ),
    );
  }
}

 

This Post Has 2 Comments

  1. Das

    Bu sayfadaki örnek uygulama kodu hata veriyor.

  2. flutter_admin

    WordPress eklentisi <> karekterleri siliyor bi oturup düzelme imkanı bulamadım kusura bakmayın.
    eksik karekter yeri:
    "ListView children:" <> karekterini silmiş.

Bir cevap yazın