frankenstein 1.0.5 copy "frankenstein: ^1.0.5" to clipboard
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

Argument Widget Description
child see Widget The Widget to be wrapped
onTap see GestureDetector Gesture Detection for the Widget
padding see Padding Encapsulate the Widget with Padding
decoration see DecoratedBox Provide Decoration around Widget
height1 see SizedBox Set a height for your Widget
width1 see SizedBox Set a width for your Widget
flex1 see Expanded Set the flex value of your Widget
canScroll see SingleChildScrollView Enable 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 publisherloyalfiasco.dev

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

cupertino_icons, flutter

More

Packages that depend on frankenstein