Skip to content

Commit

Permalink
Refactor example files with improved code formatting
Browse files Browse the repository at this point in the history
- Clean up code formatting in example files
- Improve readability by adjusting indentation and line breaks
- Maintain consistent code style across Sugar Syntax examples
  • Loading branch information
Klerith committed Feb 10, 2025
1 parent cd4d4eb commit 409261b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
1 change: 0 additions & 1 deletion example/basic-toggle-sugar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class _MyAppState extends State<MyApp> {
const Square().fadeInLeft(animate: animate),
const Square().fadeInRight(animate: animate),
],

),
const SizedBox(height: 20),
ElevatedButton(
Expand Down
6 changes: 3 additions & 3 deletions example/controller-example-sugar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class _MyAppState extends State<MyApp> {
children: <Widget>[
// Extract the controller
const Square().bounce(
manualTrigger: true,
controller: (animationCtrl) => controller = animationCtrl,
),
manualTrigger: true,
controller: (animationCtrl) => controller = animationCtrl,
),
],
),
const SizedBox(height: 20),
Expand Down
32 changes: 26 additions & 6 deletions example/on_finish-sugar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,33 @@ class _MyAppState extends State<MyApp> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
const Square().fadeIn(animate: animate, delay: const Duration(milliseconds: 0), onFinish: (direction) => print('$direction'),),
const Square().fadeInUp(animate: animate, delay: const Duration(milliseconds: 300), onFinish: (direction) => print('$direction'),),
const Square().fadeInDown(animate: animate, delay: const Duration(milliseconds: 600), onFinish: (direction) => print('$direction'),),
const Square().fadeInLeft(animate: animate, delay: const Duration(milliseconds: 900), onFinish: (direction) => print('$direction'),),
const Square().fadeInRight(animate: animate, delay: const Duration(milliseconds: 1200), onFinish: (direction) => print('$direction'),),
],
const Square().fadeIn(
animate: animate,
delay: const Duration(milliseconds: 0),
onFinish: (direction) => print('$direction'),
),
const Square().fadeInUp(
animate: animate,
delay: const Duration(milliseconds: 300),
onFinish: (direction) => print('$direction'),
),
const Square().fadeInDown(
animate: animate,
delay: const Duration(milliseconds: 600),
onFinish: (direction) => print('$direction'),
),
const Square().fadeInLeft(
animate: animate,
delay: const Duration(milliseconds: 900),
onFinish: (direction) => print('$direction'),
),
const Square().fadeInRight(
animate: animate,
delay: const Duration(milliseconds: 1200),
onFinish: (direction) => print('$direction'),
),
],
),
const SizedBox(height: 20),
ElevatedButton(
onPressed: () {
Expand Down

0 comments on commit 409261b

Please sign in to comment.