bottom_sheet_x 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 69

bottom_sheet_x #

StackBottomSheet #

import 'package:bottom_sheet_x/bottom_sheet_x.dart';

final ScrollController _scrollController = ScrollController();
final StackBottomSheetController _stackBottomSheetController = StackBottomSheetController();

// function show close
// _stackBottomSheetController.show();
// _stackBottomSheetController.close();

return StackBottomSheet(
      context: context,
      stackBottomSheetController: _stackBottomSheetController,
      body: Scaffold(
        appBar: AppBar(
          title: const Text('StackBottomSheet'),
        ),
        body: _body,
      ),
      isDismissible: true,
      backdropColor: Colors.white.withOpacity(0.1),
      bottomSheetHeight: 600.0,
      bottomSheetHeader: _bottomSheetHeader,
      bottomSheetBody: _bottomSheetBody,
      bottomSheetBodyHasScrollView: true,
      bottomSheetBodyScrollController: _scrollController,
);

import 'package:bottom_sheet_x/bottom_sheet_x.dart';

final ScrollController _scrollController = ScrollController();
final NavBottomSheetController _navBottomSheetController = NavBottomSheetController();

// function show close
// _stackBottomSheetController.close();

return Scaffold(
      appBar: AppBar(
        title: Text('NavBottomSheet'),
      ),
      body: ListView(
        children: <Widget>[
          RaisedButton(
            onPressed: () {
              showNavBottomSheet(
                context: context,
                navBottomSheetController: _navBottomSheetController,
                isDismissible: true,
                backdropColor: Colors.white.withOpacity(0.1),
                bottomSheetHeight: 360.0,
                bottomSheetBodyHasScrollView: true,
                bottomSheetBodyScrollController: _scrollController,
                bottomSheetHeader: _bottomSheetHeader,
                bottomSheetBody: _bottomSheetBody,
              ).then((onValue) {
                print(onValue);
              });
            },
            child: Text('show navBottomSheet'),
          ),
          Image.network(
              'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1578456212691&di=9c441493ee0206b788cfad871aa1055a&imgtype=0&src=http%3A%2F%2Ft8.baidu.com%2Fit%2Fu%3D1484500186%2C1503043093%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D1280%26h%3D853'),
          Image.network(
              'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1578456212691&di=dc56929190653756f42d05b6a46fdd7e&imgtype=0&src=http%3A%2F%2Ft8.baidu.com%2Fit%2Fu%3D2247852322%2C986532796%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D1280%26h%3D853'),
          Image.network(
              'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1578456212691&di=969bacdbb32609172acdc0b08c181b46&imgtype=0&src=http%3A%2F%2Ft9.baidu.com%2Fit%2Fu%3D583874135%2C70653437%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D3607%26h%3D2408'),
          Image.network(
              'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1578456212690&di=89a37618fdf6468215a3d7c957e1effe&imgtype=0&src=http%3A%2F%2Ft9.baidu.com%2Fit%2Fu%3D2268908537%2C2815455140%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D1280%26h%3D719'),
          Image.network(
              'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1578456301874&di=91e5d32f15e303c1ba869adb7b7b550a&imgtype=0&src=http%3A%2F%2Ft9.baidu.com%2Fit%2Fu%3D3949188917%2C63856583%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D1280%26h%3D875'),
          Image.network(
              'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1578456212689&di=a907d731b6eaebde3509f58c5a830a23&imgtype=0&src=http%3A%2F%2Ft8.baidu.com%2Fit%2Fu%3D2857883419%2C1187496708%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D1280%26h%3D763'),
        ],
    ),
);

1.0.0 #

  • TODO: Describe initial release.

example/lib/main.dart

import 'package:flutter/material.dart';
import './stack_bottom_sheet_test.dart';
import './nav_bottom_sheet_test.dart';

void main() => runApp(MaterialApp(
      home: MyApp(),
    ));

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Demo'),
      ),
      body: ListView(
        children: <Widget>[
          RaisedButton(
            onPressed: () {
              Navigator.push(context, MaterialPageRoute(builder: (context) {
                return StackBottomSheetTest();
              }));
            },
            child: Text('StackBottomSheet'),
          ),
          RaisedButton(
            onPressed: () {
              Navigator.push(context, MaterialPageRoute(builder: (context) {
                return NavBottomSheetTest();
              }));
            },
            child: Text('NavBottomSheet'),
          )
        ],
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  bottom_sheet_x: ^1.0.0

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:bottom_sheet_x/bottom_sheet_x.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
39
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
69
Learn more about scoring.

We analyzed this package on Jul 10, 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 does not support Flutter platform linux

Because:

  • package:bottom_sheet_x/bottom_sheet_x.dart that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because:

  • package:bottom_sheet_x/bottom_sheet_x.dart that declares support for platforms: android, ios

Package does not support Flutter platform web

Because:

  • package:bottom_sheet_x/bottom_sheet_x.dart that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because:

  • package:bottom_sheet_x/bottom_sheet_x.dart that declares support for platforms: android, ios

Package not compatible with SDK dart

Because:

  • bottom_sheet_x that is a package requiring null.

Health suggestions

Fix lib/widgets/nav_bottom_sheet.dart. (-0.50 points)

Analysis of lib/widgets/nav_bottom_sheet.dart reported 1 hint:

line 83 col 24: The value of the field '_hold' isn't used.

Fix lib/widgets/stack_bottom_sheet.dart. (-0.50 points)

Analysis of lib/widgets/stack_bottom_sheet.dart reported 1 hint:

line 62 col 24: The value of the field '_hold' isn't used.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test