FLUTTER ECOSYSTEM

CarmineToriello95/tridimensional_drawer

三維抽屜是一種輕鬆建立3D透視抽屜的方法,您可以在其中插入任何類型的組件。

三維抽屜 專案封面
Stars
6
Forks
0
最近推送(UTC)
2020年5月18日
專案狀態
未封存
CarmineToriello95 GitHub avatar
GITHUB User

CarmineToriello95 ↗

I'm a Mobile Developer, passionate with Flutter. I like recreating beautiful and complex design

Berlin
語言Dart

技術主題

此儲存庫發佈的套件

使用的依賴

依賴清單 2 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

Tridimensional Drawer

Tridimensional Drawer is an easy way to create a 3D Perspective drawer, where you can insert any type of widget.

Version 0.1.0 Note

The version 0.1.0 solves the exception caused by the SingleTickerProviderStateMixin.

Demo

drawing

Installing

Add the package to your pubspec.yml file

dependencies:
    tridimensional_drawer: ^0.1.1

Example

Full example available in the example folder.

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

class Example extends StatefulWidget {
  @override
  _ExampleState createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  final TridimensionalDrawerController controller =
      TridimensionalDrawerController();

  @override
  Widget build(BuildContext context) {
    return TridimensionalDrawer(
      controller: controller,
      mainPage: GestureDetector(
        onTap: () => controller.open(),
        child: MainPage(),
      ),
      drawer: CustomDrawer(),
      backgroundPage: GestureDetector(
        onTap: () => controller.close(),
        child: Container(
          color: Colors.white,
        ),
      ),
    );
  }
}

Hint

If you use a widget containing a Scaffold as the mainPage, try to wrap the body of it inside a SingleChildScrollView, otherwise the rendering of the mainPage could go wrong at the end of the drawer opening animation.