This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
/// A widget that displays a floating green box with two distinct shadows, | |
/// centered on the screen. | |
class FloatingShadowBox extends StatelessWidget { | |
/// The color for both shadows. | |
static const Color _shadowBaseColor = Color(0xFF5C5C5C); | |
/// Configuration for the first shadow. | |
static const BoxShadow _shadow1 = BoxShadow( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// https://dartpad.dev/?id=29e521dd61c7410d189a6f9f2047ab9a | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatefulWidget { | |
const MyApp({super.key}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef Callback = void Function(dynamic); | |
void _doSomething(Callback callback, dynamic data) { | |
callback(data); | |
} | |
class Animal { | |
final String name; | |
Animal({required this.name}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(const AnimatedContainerExampleApp()); | |
class AnimatedContainerExampleApp extends StatelessWidget { | |
const AnimatedContainerExampleApp({super.key}); | |
@override | |
Widget build(BuildContext context) { |