drawer_master_detail 0.1.4

  • Readme
  • Changelog
  • Example
  • Installing
  • 76

drawer_master_detail #

A new Flutter package to build a Drawer like Master Detail Page of Xamarin and Android Native Drawer.

Getting Started #

Usage Example #

import drawer_master_detail.dart

import 'package:drawer_master_detail/drawer_master_detail.dart';

Samples #

import 'package:drawer_master_detail/drawer_master_detail.dart';
import 'package:drawer_master_detail/model/drawer_master_item.dart';
import 'package:example_drawer_master_detail/src/pages/page_01.dart';
import 'package:example_drawer_master_detail/src/pages/page_02.dart';
import 'package:example_drawer_master_detail/src/pages/page_03.dart';
import 'package:flutter/material.dart';

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return DrawerMasterDetail(      
      selectedBackGroundColor: Colors.grey,
      drawerMasterItems: [
        DrawerMasterItem(page: Page01(),item:ListTile(title: Text("Page 01"),), selectedItem:ListTile(title: Text("Page 01" , style: TextStyle(color: Colors.white), ),) ),
        DrawerMasterItem(page: Page02(),item:ListTile(title: Text("Page 02"),)),
        DrawerMasterItem(page: Page03(),item:ListTile(title: Text("Page 03"),)),
        DrawerMasterItem.customItem(Divider(
          color: Colors.red,
        )),
        DrawerMasterItem(page: Page03(),item:ListTile(title: Text("Page 04"),) , appBar:AppBar(title: Text("Menu legal"),),),
        DrawerMasterItem(page: Page03(),item:ListTile(title: Text("Page 05"),)),
        DrawerMasterItem(page: Page03(),item:ListTile(title: Text("Page 06"),)),
        DrawerMasterItem(page: Page03(),item:ListTile(title: Text("Page 07"),)),        
        DrawerMasterItem(page: Page03(),item:ListTile(title: Text("Page 08"),)),
        DrawerMasterItem.customItem(Container(         
          child: Column(            
            children: <Widget>[            
              Divider(),
              Text("Titulo Diferente", style: TextStyle(color: Colors.grey),),            
            ],
          ),
        )),
        DrawerMasterItem(page: Page03(),item:ListTile(title: Text("Page 09"),)),
        DrawerMasterItem(page: Page03(),item:ListTile(title: Text("Page 10"),)),
        DrawerMasterItem(page: Page03(),item:ListTile(title: Text("Page 11"),)),
        DrawerMasterItem(page: Page03(),item:ListTile(title: Text("Page 12"),)),
        DrawerMasterItem(page: Page03(),item:ListTile(title: Text("Page 13"),)),
        DrawerMasterItem(page: Page03(),item:ListTile(title: Text("Page 14"),)),
      ],
      footer: Container(
        height: 50,
        alignment: Alignment.center,
        width: double.infinity,
        color: Colors.red,
        child: Text("Footer")),
   //   header: Text("Casa"),
      userAccountsDrawerHeader: UserAccountsDrawerHeader(
        accountEmail: Text("bwolfnoob@gmail.com"),
        accountName: Text("bwolf"),
        currentAccountPicture: CircleAvatar(
          child: Text("BW"),
          backgroundColor: Colors.yellowAccent,
        ),
      ),
      
      initPage: DrawerMasterItem(page: Page01(),item:ListTile(title: Text("Home Page"),) ),
    );
  }
}

[0.1.4] - Change Title to Widget

[0.1.3] - Health

[0.1.2] - fix menu

[0.1.0] - add group of items

[0.0.2] - add responsible for web / desktop

[0.0.1] - First Release but with good things

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:example_drawer_master_detail/src/app_module.dart';

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

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  drawer_master_detail: ^0.1.4

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:drawer_master_detail/drawer_master_detail.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
57
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
76
Learn more about scoring.

We analyzed this package on Jul 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • drawer_master_detail that is a package requiring null.

Health suggestions

Format lib/drawer_master.dart.

Run flutter format to format lib/drawer_master.dart.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (rxdart).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
rxdart ^0.23.1 0.23.1 0.24.1
uuid ^2.0.2 2.2.0
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
convert 2.1.1
crypto 2.1.5
meta 1.1.8 1.2.1
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test