Skip to content

Instantly share code, notes, and snippets.

@hsSam
Last active June 25, 2019 03:32
Show Gist options
  • Save hsSam/aa47c4b9338082a16bf7025970d2dbac to your computer and use it in GitHub Desktop.
Save hsSam/aa47c4b9338082a16bf7025970d2dbac to your computer and use it in GitHub Desktop.

Revisions

  1. hsSam revised this gist Jun 25, 2019. 1 changed file with 23 additions and 1 deletion.
    24 changes: 23 additions & 1 deletion style.dart
    Original file line number Diff line number Diff line change
    @@ -47,4 +47,26 @@ Text('example',
    ),
    )


    // customer button
    class MyButton extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
    return GestureDetector(
    onTap: () {
    print("MyButton was tapped!");
    },
    child: Container(
    height: 36.0,
    padding: const EdgeInsets.all(8.0),
    margin: const EdgeInsets.symmetric(horizontal: 8.0),
    decoration: BoxDecoration(
    borderRadius: BorderRadius.circular(5.0),
    color: Colors.lightGreen[500],
    ),
    child: Center(
    child: Text('Engage'),
    ),
    ),
    );
    }
    }
  2. hsSam revised this gist Jun 25, 2019. 1 changed file with 13 additions and 1 deletion.
    14 changes: 13 additions & 1 deletion style.dart
    Original file line number Diff line number Diff line change
    @@ -35,4 +35,16 @@ Duration(milliseconds: 500)
    // Provide an optional curve to make the animation feel smoother.
    curve: Curves.fastOutSlowIn,


    //text style
    Text('example',
    style: TextStyle(
    color: Colors.red,
    fontSize: 18.0,
    decorationStyle: TextDecorationStyle.dashed,
    bakcgroudColor: Colors.yellow,
    height: 1.0,
    fontWeight: FontWeight.bold
    ),
    )


  3. hsSam revised this gist Jun 24, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions style.dart
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,7 @@ Container(
    width: 200.0,
    height: 200.0,
    color: Colors.green,
    margin: EdgeInsets.symmetric(vertical: 20.0),
    );

    // Color
  4. hsSam revised this gist Jun 24, 2019. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions style.dart
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,10 @@
    //container
    Container(
    width: 200.0,
    height: 200.0,
    color: Colors.green,
    );

    // Color
    Color _color = Colors.green;
    _color = Color.fromRGBO(random.nextInt(256), random.nextInt(256), random.nextInt(256), 1,);
    @@ -23,6 +30,7 @@ const EdgeInsets.all(16.0)
    //animation param
    // Define how long the animation should take.
    duration: Duration(seconds: 1),
    Duration(milliseconds: 500)
    // Provide an optional curve to make the animation feel smoother.
    curve: Curves.fastOutSlowIn,

  5. hsSam revised this gist Jun 24, 2019. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions style.dart
    Original file line number Diff line number Diff line change
    @@ -13,3 +13,17 @@ decoration: BoxDecoration(
    //Icon
    Icon(Icons.play_arrow)

    //font size
    final _biggerFont = const TextStyle(fontSize: 18.0);
    final _smallFont = const TextStyle(fontSize: 12.0);

    //padding
    const EdgeInsets.all(16.0)

    //animation param
    // Define how long the animation should take.
    duration: Duration(seconds: 1),
    // Provide an optional curve to make the animation feel smoother.
    curve: Curves.fastOutSlowIn,


  6. hsSam created this gist Jun 24, 2019.
    15 changes: 15 additions & 0 deletions style.dart
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    // Color
    Color _color = Colors.green;
    _color = Color.fromRGBO(random.nextInt(256), random.nextInt(256), random.nextInt(256), 1,);

    //border Radius
    BorderRadiusGeometry _borderRadius = BorderRadius.circular(8);

    decoration: BoxDecoration(
    color: _color,
    borderRadius: _borderRadius,
    ),

    //Icon
    Icon(Icons.play_arrow)