easy_comp 0.0.2 easy_comp: ^0.0.2 copied to clipboard
Componentes Feitos mais para uso pessoal.
Features #
- Inclue BaseWidget
- Inclue BasefulWidget
Instalação #
- Adicione a ultima versão ao arquivo pubspec.yaml (e rode 'dart pub get');
dependencies:
easy_comp: ^0.0.1
- Importe o pacote para usar no seu App Flutter
import 'package:easy_comp/easy_comp.dart';
Usage #
- Usando componente StatelessWidget
import 'package:flutter/material.dart';
import 'package:easy_comp/easy_comp.dart';
class EasyCompTeste extends BaseWidget {
EasyCompTeste({Key? key});
@override
Widget builder(BuildContext context, BoxConstraints constrains) {
return Container(
child: Center(
child: Text("Usando BaseWidget"),
),
);
}
}
- Usando componente StatefulWidget
import 'package:flutter/material.dart';
import 'package:easy_comp/easy_comp.dart';
class EasyCompTeste extends BasefulWidget {
EasyCompTeste({Key? key});
@override
_EasyCompTesteState createState() => _EasyCompTesteState();
}
class _EasyCompTesteState extends BasefulWidgetState<EasyCompTeste> {
@override
Widget builder(BuildContext context, BoxConstraints constrains) {
return Container(
child: Center(
child: Text("Usando BaseWidgetFull"),
),
);
}
}