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
class Persona { | |
final String nombre; | |
final String edad; | |
//modo 1 , parametros con nombre opcionales | |
//Persona({this.nombre, this.edad}); | |
//modo 2 , valores obligatorios con posición fija | |
// Persona(this.nombre, this.edad); |
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
class AnimatedItem extends StatefulWidget { | |
final String title; | |
const AnimatedItem({Key key, this.title}) : super(key: key); | |
@override | |
_AnimatedItemState createState() => _AnimatedItemState(); | |
} | |
class _AnimatedItemState extends State<AnimatedItem> |
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
class SampleCardList extends StatelessWidget { | |
final items = 20; | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Column( | |
children: [ | |
Expanded( | |
flex: 2, |
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
double _valorSlider = 50; | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar(), | |
backgroundColor: Colors.grey, | |
body: SliderTheme( | |
data: Theme.of(context) | |
.sliderTheme |
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
void main() { | |
const Map mymap = { | |
'status': { | |
'start': ['Start', 'ok', 'go'], | |
}, | |
'update': { | |
'now': ['Start', 'ok', 'go'], | |
}, | |
'time': [ |
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'; | |
class AnimatedLine extends StatefulWidget { | |
@override | |
_AnimatedLineState createState() => _AnimatedLineState(); | |
} | |
class _AnimatedLineState extends State<AnimatedLine> | |
with SingleTickerProviderStateMixin { | |
AnimationController _controller; |
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
class Sample2 extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return SafeArea( | |
child: Material( | |
child: CustomScrollView( | |
slivers: [ | |
SliverPersistentHeader( | |
delegate: MySliverAppBar(expandedHeight: 200), | |
pinned: true, |
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'; | |
class Sample1 extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return SafeArea( | |
child: Scaffold( | |
drawer: Drawer(), | |
appBar: MyCustomAppBar( | |
height: 150, |