Skip to content

Instantly share code, notes, and snippets.

@cristianfb1989
Created April 3, 2020 19:18
Show Gist options
  • Save cristianfb1989/6059a6d7b465ea38825077b2966a889e to your computer and use it in GitHub Desktop.
Save cristianfb1989/6059a6d7b465ea38825077b2966a889e to your computer and use it in GitHub Desktop.
Code
import 'package:flutter/material.dart';
import 'package:iMooDSSP/util/box_decoration.dart';
class Marcas extends StatefulWidget {
@override
_MarcasState createState() => _MarcasState();
}
class _MarcasState extends State<Marcas> {
Color colorMagenta = Color(0xFFD60B52);
var colorDimGray = Color(0XFF666666);
Future<bool> _onWillPop() async {
return Navigator.of(context).pop(false);
}
@override
Widget build(BuildContext context) {
double mediaHeight = MediaQuery.of(context).size.height;
double mediaWidth = MediaQuery.of(context).size.width;
final customBorder = OutlineInputBorder(
borderSide: BorderSide(color: colorDimGray, width: 1),
borderRadius: BorderRadius.all(Radius.circular(70)));
return WillPopScope(
onWillPop: _onWillPop,
child: Stack(
children: <Widget>[
Container(
height: double.infinity,
width: double.infinity,
decoration: decorationFormat,
),
Scaffold(
appBar: AppBar(
centerTitle: true,
title: Text(
'Marcas',
style: TextStyle(fontFamily: 'Roboto'),
),
backgroundColor: Colors.transparent,
elevation: 0.0,
),
backgroundColor: Colors.transparent,
body: Center(
child: Container(
child: ListView(
children: <Widget>[
Container(
//height: 100,
child: Center(
child: Row(
children: <Widget>[
TextField(
style: TextStyle(
fontFamily: 'Roboto',
fontSize: 20,
),
cursorColor: Colors.red,
decoration: InputDecoration(
contentPadding: EdgeInsets.only(
left: 20, bottom: 40, top: 55),
enabledBorder: customBorder,
focusedBorder: customBorder,
border: customBorder,
),
),
IconButton(
icon: Icon(Icons.search,
color: Colors.black, size: 40),
onPressed: () {},
),
],
),
),
),
],
)),
)),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment