You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.7 KiB
59 lines
1.7 KiB
3 years ago
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
buildNewHead(BuildContext context, Function clear, String title) {
|
||
|
return Container(
|
||
|
width: MediaQuery.of(context).size.width,
|
||
|
child: Row(
|
||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
|
children: [
|
||
|
InkWell(
|
||
|
onTap: () => Navigator.pop(context),
|
||
|
child: Container(
|
||
|
margin: EdgeInsets.all(20),
|
||
|
height: 30,
|
||
|
width: 30,
|
||
|
decoration: BoxDecoration(
|
||
|
borderRadius: BorderRadius.circular(30.0),
|
||
|
color: Theme.of(context).colorScheme.secondary,
|
||
|
),
|
||
|
child: ClipRRect(
|
||
|
borderRadius: BorderRadius.only(
|
||
|
topLeft: Radius.circular(30.0),
|
||
|
topRight: Radius.circular(30.0),
|
||
|
bottomLeft: Radius.circular(30),
|
||
|
bottomRight: Radius.circular(30),
|
||
|
),
|
||
|
child: Align(
|
||
|
alignment: Alignment.center,
|
||
|
child: Icon(
|
||
|
Icons.arrow_back_ios,
|
||
|
color: Colors.white,
|
||
|
)),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
Text(title),
|
||
|
InkWell(
|
||
|
onTap: () => clear(),
|
||
|
child: Container(
|
||
|
margin: EdgeInsets.all(20),
|
||
|
padding: EdgeInsets.all(05),
|
||
|
height: 40,
|
||
|
width: 80,
|
||
|
decoration: BoxDecoration(
|
||
|
borderRadius: BorderRadius.circular(30.0),
|
||
|
color: Theme.of(context).colorScheme.secondary,
|
||
|
),
|
||
|
child: Center(
|
||
|
child: Text(
|
||
|
"Clear",
|
||
|
style: TextStyle(color: Colors.white),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
);
|
||
|
}
|