gas refill
parent
ec4d4a9193
commit
64b249a0cd
@ -0,0 +1,36 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:test_sa/extensions/context_extension.dart';
|
||||||
|
import 'package:test_sa/new_views/app_style/app_color.dart';
|
||||||
|
|
||||||
|
import '../../models/enums/translation_keys.dart';
|
||||||
|
|
||||||
|
class AppSearchField extends StatefulWidget {
|
||||||
|
final Function(String) onChanged;
|
||||||
|
final Function(String) onSubmitted;
|
||||||
|
const AppSearchField({Key key, this.onChanged, this.onSubmitted}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<AppSearchField> createState() => _AppSearchFieldState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AppSearchFieldState extends State<AppSearchField> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return TextField(
|
||||||
|
onChanged: widget.onChanged,
|
||||||
|
onSubmitted: widget.onSubmitted,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
prefixIcon: const Icon(Icons.search, color: AppColor.neutral20,),
|
||||||
|
hintText: context.translate(TranslationKeys.search),
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontSize: Theme.of(context).textTheme.bodySmall.fontSize
|
||||||
|
),
|
||||||
|
filled: true,
|
||||||
|
fillColor: AppColor.neutral30,
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(15),
|
||||||
|
borderSide: BorderSide.none,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AppTabBar extends StatelessWidget {
|
||||||
|
|
||||||
|
const AppTabBar({Key key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return TabBar(
|
||||||
|
tabs:[
|
||||||
|
Tab(
|
||||||
|
icon: Icon(Icons.cloud_outlined),
|
||||||
|
),
|
||||||
|
Tab(
|
||||||
|
icon: Icon(Icons.beach_access_sharp),
|
||||||
|
),
|
||||||
|
Tab(
|
||||||
|
icon: Icon(Icons.brightness_5_sharp),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:test_sa/extensions/context_extension.dart';
|
||||||
|
import 'package:test_sa/models/enums/translation_keys.dart';
|
||||||
|
|
||||||
|
import '../../../app_style/app_color.dart';
|
||||||
|
import '../../../common_widgets/app_search_field.dart';
|
||||||
|
|
||||||
|
class MyRequestsPage extends StatelessWidget {
|
||||||
|
const MyRequestsPage({Key key}) : super(key: key);
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
|
||||||
|
leadingWidth: 0,
|
||||||
|
title: Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 10),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Expanded(child: SizedBox(
|
||||||
|
height: 50,
|
||||||
|
child: AppSearchField())),
|
||||||
|
SizedBox(width: 20,),
|
||||||
|
Text(context.translate(TranslationKeys.filter), style: TextStyle(
|
||||||
|
color: AppColor.primary50,
|
||||||
|
fontSize: Theme.of(context).textTheme.bodySmall.fontSize,
|
||||||
|
fontWeight: FontWeight.w500
|
||||||
|
),)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
body: TabBarView(
|
||||||
|
children: const <Widget>[
|
||||||
|
Center(
|
||||||
|
child: Text("It's cloudy here"),
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Text("It's rainy here"),
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Text("It's sunny here"),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,14 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class MyRequestsPage extends StatelessWidget {
|
|
||||||
const MyRequestsPage({Key key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return const Scaffold(
|
|
||||||
body: Center(
|
|
||||||
child: Text("My Requests"),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue