Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import 'package:line_icons/line_icons.dart';
- class ConfigScreen extends StatefulWidget {
- @override
- _ConfigScreenState createState() => _ConfigScreenState();
- }
- class _ConfigScreenState extends State<ConfigScreen> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- backgroundColor: Color(0xfff2f3fa),
- appBar: AppBar(
- iconTheme: IconThemeData(color: Color(0xff71808f)),
- title: Text('Konfiguracja'),
- brightness: Brightness.light,
- elevation: 0.0,
- ),
- body: Builder(
- builder: (context) => Container(
- margin: EdgeInsets.all(15.0),
- child: Form(
- child: SingleChildScrollView(
- child: Column(
- children: <Widget>[
- Padding(
- padding: EdgeInsets.all(8.0),
- child: TextField(
- autofocus: false,
- decoration: InputDecoration(
- icon: Icon(LineIcons.envelope),
- filled: true,
- fillColor: Colors.white,
- border: InputBorder.none,
- hintText: 'Email',
- contentPadding: const EdgeInsets.only(
- left: 14.0, bottom: 8.0, top: 8.0),
- enabledBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: Color(0xffced4da),
- width: 0.7,
- ),
- borderRadius: BorderRadius.circular(15.0),
- ),
- focusedBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: Color(0xffced4da),
- width: 0.7,
- ),
- borderRadius: BorderRadius.circular(15.0),
- ),
- ),
- textInputAction: TextInputAction.next,
- ),
- ),
- Padding(
- padding: EdgeInsets.all(8.0),
- child: TextField(
- obscureText: true,
- autofocus: false,
- decoration: InputDecoration(
- icon: Icon(LineIcons.key),
- filled: true,
- fillColor: Colors.white,
- border: InputBorder.none,
- hintText: 'Hasło',
- contentPadding: const EdgeInsets.only(
- left: 14.0, bottom: 8.0, top: 8.0),
- enabledBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: Color(0xffced4da),
- width: 0.7,
- ),
- borderRadius: BorderRadius.circular(15.0),
- ),
- focusedBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: Color(0xffced4da),
- width: 0.7,
- ),
- borderRadius: BorderRadius.circular(15.0),
- ),
- ),
- textInputAction: TextInputAction.next,
- ),
- ),
- Padding(
- padding: EdgeInsets.all(8.0),
- child: TextField(
- autofocus: false,
- decoration: InputDecoration(
- icon: Icon(LineIcons.globe),
- filled: true,
- fillColor: Colors.white,
- border: InputBorder.none,
- hintText: 'Adres do PaneluOptimo',
- contentPadding: const EdgeInsets.only(
- left: 14.0, bottom: 8.0, top: 8.0),
- enabledBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: Color(0xffced4da),
- width: 0.7,
- ),
- borderRadius: BorderRadius.circular(15.0),
- ),
- focusedBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: Color(0xffced4da),
- width: 0.7,
- ),
- borderRadius: BorderRadius.circular(15.0),
- ),
- ),
- textInputAction: TextInputAction.next,
- ),
- ),
- Padding(
- padding: EdgeInsets.all(8.0),
- child: ButtonTheme(
- minWidth: double.infinity,
- child: RaisedButton(
- elevation: 6.0,
- color: Color(0xff888c8f),
- textColor: Colors.white,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- Icon(LineIcons.save),
- Text(
- 'ZAPISZ',
- style: TextStyle(fontFamily: 'Poppins_Bold'),
- )
- ],
- ),
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(15.0)),
- onPressed: () {
- Scaffold.of(context).showSnackBar(
- SnackBar(
- backgroundColor: Colors.green,
- content: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- Icon(LineIcons.check),
- Text(
- 'Ustawienia zapisane!',
- style:
- TextStyle(fontFamily: 'Poppins_Bold'),
- ),
- ]),
- ),
- );
- },
- ),
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment