z_components 0.2.7 z_components: ^0.2.7 copied to clipboard
Z_Components is a package that contains a set of standardized components to facilitate, optimize, and accelerate the development of Zellar company's Android / IOS applications.
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:z_components/components/z-float-button.dart';
import 'package:z_components/components/z-sequencia/z-sequencia.dart';
import 'package:z_components/components/z_tabbar.dart';
import 'package:z_components/components/z-baseline.dart';
import 'package:z_components/components/z_navigationbar.dart';
import 'package:z_components/components/z-instrucao-batida.dart';
import 'package:flutter/cupertino.dart';
import 'package:z_components/components/z-empresa.dart';
import 'package:z_components/components/z-escala.dart';
import 'package:z_components/components/z-local.dart';
import 'package:z_components/components/z-collection.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(child: ComponentExemploClasse()),
bottomNavigationBar: ZtabBar(
backgroundColor: Colors.teal,
items: <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.home),
title: Text('Home'),
),
BottomNavigationBarItem(
icon: Icon(Icons.business),
title: Text('Business'),
),
BottomNavigationBarItem(
icon: Icon(Icons.school),
title: Text('School'),
),
],
onTap: (index) => index = index,
currentIndex: 0,
iconSize: 16,
inactiveColor: Colors.black,
activeColor: Colors.black,
selectedItemColor: Colors.white,
unselectedItemColor: Colors.black45,
// currentIndex: _selectedIndex,
),
),
);
}
}
class ComponentExemploClasse extends StatefulWidget {
@override
_ComponentExemploClasseState createState() => _ComponentExemploClasseState();
}
class _ComponentExemploClasseState extends State<ComponentExemploClasse> {
var controllerEmail = new TextEditingController();
var controllerNome = new TextEditingController();
var controllerCPF = new TextEditingController();
var controllerCelular = new TextEditingController();
var controllerData = new TextEditingController();
var controllerSenha = new TextEditingController();
var controllerRepetirSenha = new TextEditingController();
var controllerRua = new TextEditingController();
var controllerCEP = new TextEditingController();
var controllerCNPJ = new TextEditingController();
var controllerNumero = new TextEditingController();
FocusNode nomeFocus;
FocusNode emailFocus;
FocusNode cpfFocus;
FocusNode celularFocus;
FocusNode mesFocus;
FocusNode ruaFocus;
FocusNode numeroFocus;
FocusNode cEPFocus;
FocusNode cNPJFocus;
bool value = false;
var _controllerFim = new TextEditingController();
var _controllerIntervalo = new TextEditingController();
var _controllerHorarioInicio = new TextEditingController();
ZBaseLine valideNome;
ZBaseLine valideCPF;
ZBaseLine valideData;
ZBaseLine valideEmail;
ZBaseLine valideCelular;
var _keyStatus = new GlobalKey<ZCollectionState>();
String vp;
String _value = "open";
List<String> titulos = [
"Lista de Documentos",
"Espelho de Ponto",
"Gestão de Ponto",
"Atestados",
"Histórico Alocações",
"Histórico Status",
"Histórico FériasHistórico Férias",
"Histórico Afastamento",
"Dependentes"
];
List<IconData> icones = [
Icons.assignment,
Icons.list,
Icons.add_to_home_screen,
Icons.attach_file,
Icons.fastfood,
Icons.add_circle_outline,
Icons.backup,
Icons.voice_chat,
Icons.view_stream
];
List<dynamic> listaOnTap = [
() {
print("1");
},
() {
print("2");
},
() {
print("3");
},
() {
print("4");
},
() {
print("5");
},
() {
print("6");
},
() {
print("7");
},
() {
print("8");
},
() {
print("9");
},
];
var _keyEscala = new GlobalKey<ZEscalaState>();
var _keyLocal = new GlobalKey<ZLocalState>();
var _keyEmpresa = new GlobalKey<ZEmpresaState>();
@override
void initState() {
nomeFocus = new FocusNode();
emailFocus = new FocusNode();
cpfFocus = new FocusNode();
celularFocus = new FocusNode();
mesFocus = new FocusNode();
ruaFocus = new FocusNode();
numeroFocus = new FocusNode();
cEPFocus = new FocusNode();
cNPJFocus = new FocusNode();
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
floatingActionButton: ZFloatButton(
onPressed: () {},
),
appBar: ZNavigationBar(
leading: new Icon(Icons.print),
middle: new Container(
child: new Text('teste'),
),
trailing: new GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => new InformacaoBatida(
bottomChild: new Container(
alignment: Alignment.center,
margin: EdgeInsets.only(bottom: 5),
child: new ButtonTheme(
minWidth: 145,
child: new RaisedButton(
color: Color(0xff2bbab4),
child: new Text(
"ENTENDI",
style: new TextStyle(
color: Colors.white,
fontWeight: FontWeight.w600),
),
onPressed: () {
Navigator.pop(context);
},
shape: new RoundedRectangleBorder(
borderRadius:
new BorderRadius.circular(30.0))),
)),
)),
);
},
child: new Container(
child: new Icon(
Icons.info,
color: Colors.blue,
size: 19.0,
),
),
),
),
body: new Container(
color: Colors.grey,
padding: const EdgeInsets.all(16.0),
child: new Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new ZSequencia(
token:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6IjZmYWI2Yjk3LTkyMjctNGUyOS05MzVhLTM5ZjNmN2E4Y2E1ZiIsImFjY291bnQiOiJaZWxsYXJUZW5hbnQiLCJpZEFjY291bnQiOiI5YzZlZDk2ZC1iODM1LTQzNGEtOWE0My01NmNhMjFiZDg0YzEiLCJuYmYiOjE1NjM0ODA5NzYsImV4cCI6MTU2NDA4NTc3NiwiaWF0IjoxNTYzNDgwOTc2fQ.xK3ROTSn6rP-9ODwGou4wA5mwa4vgeC5gGqyigMIix4",
idConta: "486A49B3-47D1-4D76-80DF-079EB82D6D8F",
idColaborador: "548D524D-A6DE-4D8A-945E-A706AD2F87F2",
)
],
),
));
}
}
class AppSwitch with ChangeNotifier {
AppSwitch();
bool _value = false;
String _text = "";
set value(bool text) {
_value = text;
notifyListeners();
}
bool get value => _value;
set text(String text) {
_text = text;
notifyListeners();
}
String get text => _text;
}