frankenstein 1.0.5 icon indicating copy to clipboard operation
frankenstein: ^1.0.5 copied to clipboard

A straight forward approach to combining commonly used Flutter UI elements into a single implementation.

Frankenstein #

A straight forward approach to combining commonly used Flutter UI elements into a single implementation.

Contents #

Features #

Here is a list of some of the coolest features of the plugin:

  • ✅ SizedBox
  • ✅ GestureDetector
  • ✅ Padding
  • ✅ Expanded
  • ✅ DecoratedBox
  • ✅ SingleChildScrollView
  • ✅ GestureDetector
  • ✅ GestureDetector
  • ...

Getting Started #

The Frankenstein plugin currently ships with a single widget named 'ZZ' which enables all of the feature capabilities.

Usage is as simple as specifying the properties you want the child to be contained in.

ZZ(
  flex: 0,
  padding: const EdgeInsets.all(20.0),
  canScroll: true,
  decoration: BoxDecoration(
    borderRadius: BorderRadius.circular(4.0),
    border: Border.all(),
  ),
  onTap: () {
    // Tap handler
  },
  child: const Center(
    child: Text(
      'Hello!',
      style: TextStyle(color: Colors.red),
    ),
  ),
),

Usage #

final Widget child; final void Function()? onTap; final EdgeInsets? padding; final Decoration? decoration; final double? height; final double? width; final int? flex; final bool? canScroll;

Here the list of available arguments

ArgumentWidgetDescription
childsee WidgetThe Widget to be wrapped
onTapsee GestureDetectorGesture Detection for the Widget
paddingsee PaddingEncapsulate the Widget with Padding
decorationsee DecoratedBoxProvide Decoration around Widget
height1see SizedBoxSet a height for your Widget
width1see SizedBoxSet a width for your Widget
flex1see ExpandedSet the flex value of your Widget
canScrollsee SingleChildScrollViewEnable scrolling for your Widget

1 : These properties are mutually exclusive. If both flex and width/height are specified, only flex will be used.

License #

Copyright (c) 2021-2022 Michael Wrock. Licensed under the BSD License (BSD)

Credits #

Built with Nx and NxRocks.

2
likes
140
pub points
0%
popularity

Publisher

verified publisher iconloyalfiasco.dev

A straight forward approach to combining commonly used Flutter UI elements into a single implementation.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

Dependencies

cupertino_icons, flutter

More

Packages that depend on frankenstein