diff options
| author | Akshay Nair <phenax5@gmail.com> | 2020-06-02 22:17:22 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2020-06-02 22:17:22 +0530 |
| commit | c285f8e733d448555209f95fd76eedbeef5d9e24 (patch) | |
| tree | e28137a9fa79ba4c8e721df9877d0ee4671f4973 /lib/components/FixedContainer.dart | |
| parent | c60b58a16662fb33121e94b05cc1c868d8f3f16d (diff) | |
| download | daft-launcher-c285f8e733d448555209f95fd76eedbeef5d9e24.tar.gz daft-launcher-c285f8e733d448555209f95fd76eedbeef5d9e24.zip | |
Adds application list component in apps view
Diffstat (limited to 'lib/components/FixedContainer.dart')
| -rw-r--r-- | lib/components/FixedContainer.dart | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/components/FixedContainer.dart b/lib/components/FixedContainer.dart new file mode 100644 index 0000000..99db1c8 --- /dev/null +++ b/lib/components/FixedContainer.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; +import 'package:device_apps/device_apps.dart'; + +import '../components/AppList.dart'; + +class FixedContainer extends StatelessWidget { + EdgeInsets padding; + Widget child; + + FixedContainer({ this.padding, this.child }): super(); + + @override + Widget build(BuildContext ctx) { + return LayoutBuilder( + builder: (BuildContext context, BoxConstraints viewportConstraints) { + return SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: viewportConstraints.maxHeight, + ), + child: IntrinsicHeight( + child: Container( + padding: padding, + height: viewportConstraints.maxHeight, + child: child, + ) + ), + ), + ); + } + ); + } +} + |
