Skip to content

Commit

Permalink
feat: add doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeluse committed Jan 6, 2022
1 parent 96acd56 commit 73459dc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
40 changes: 20 additions & 20 deletions packages/frankenstein/lib/frankenstein.dart
@@ -1,33 +1,44 @@
import 'package:flutter/material.dart';

class ZZ extends StatelessWidget {
// The bottom level child widget to be wrapped
/// The bottom level child widget to be wrapped
final Widget child;

// Specified whether a GestureDetector should be created with the provided onTap callback
/// Specified whether a GestureDetector should be created with the provided onTap callback
final void Function()? onTap;

// Creates a Padding widget with the specified EdgeInsets outside of the DecoratedBox
/// Creates a Padding widget with the specified EdgeInsets outside of the DecoratedBox
final EdgeInsets? margin;

// Creates a Padding widget with the specified EdgeInsets inside of the DecoratedBox
/// Creates a Padding widget with the specified EdgeInsets inside of the DecoratedBox
final EdgeInsets? padding;

// Encapsulates the child with a DecoratedBox using the passed in Decoration
/// Encapsulates the child with a DecoratedBox using the passed in Decoration
final Decoration? decoration;

// Specifies the height of the wrapper. Note: Cannot be used with the flex property
/// Specifies the height of the wrapper. Note: Cannot be used with the flex property
final double? height;

// Specifies the width of the wrapper. Note: Cannot be used with the flex property
/// Specifies the width of the wrapper. Note: Cannot be used with the flex property
final double? width;

// Specifies the flex property of an Expanded widget. Note: cannot be used with the width/height properties
/// Specifies the flex property of an Expanded widget. Note: cannot be used with the width/height properties
final int? flex;

// Indicates whether the child should be wrapped with a SingleChildScrollView
/// Indicates whether the child should be wrapped with a SingleChildScrollView
final bool? canScroll;

/// Creates the desired Widget hierarchy based on the provided arguments.
///
/// Widgets are created in the following order
/// - Padding (margin)
/// - DecoratedBox
/// - Padding (padding)
/// - GestureDetector
/// - SingleChildScrollView
/// - Expanded / SizedBox
///
/// Understanding the order is helpful in understanding the outcome when multiple properties are defined.
const ZZ(
{required this.child,
this.onTap,
Expand Down Expand Up @@ -89,17 +100,6 @@ class ZZ extends StatelessWidget {
);
}

// Creates the desired Widget hierarchy based on the provided arguments.
//
// Widgets are created in the following order
// - Padding (margin)
// - DecoratedBox
// - Padding (padding)
// - GestureDetector
// - SingleChildScrollView
// - Expanded / SizedBox
//
// Understanding the order is helpful in understanding the outcome when multiple properties are defined.
@override
Widget build(BuildContext context) {
// Local property to store the composed Widget return
Expand Down
2 changes: 1 addition & 1 deletion packages/frankenstein/pubspec.yaml
Expand Up @@ -16,7 +16,7 @@ repository: https://github.com/loyalfiasco/Frankenstein
# This version is used _only_ for the Runner app, which is used if you just do
# a `flutter run` or a `flutter make-host-app-editable`. It has no impact
# on any other native host app that you embed your Flutter project into.
version: 1.0.3
version: 1.0.4

environment:
sdk: ">=2.15.0 <3.0.0"
Expand Down

0 comments on commit 73459dc

Please sign in to comment.