75 lines
2.5 KiB
Dart
75 lines
2.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:proxibuy/core/gen/assets.gen.dart';
|
|
import 'package:proxibuy/presentation/ui/theme/responsive.dart';
|
|
|
|
class HomeScreen extends StatefulWidget {
|
|
const HomeScreen({super.key});
|
|
|
|
@override
|
|
State<HomeScreen> createState() => _HomeScreenState();
|
|
}
|
|
|
|
class _HomeScreenState extends State<HomeScreen> {
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final defaultBorder = OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide:
|
|
BorderSide(color: Theme.of(context).colorScheme.surface, width: 2));
|
|
return Responsive(context).builder(
|
|
mobile: Scaffold(
|
|
body: Padding(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: <Widget>[
|
|
// ElevatedButton(
|
|
// onPressed: () async {
|
|
// final notifPer = await requestNotificationPermission();
|
|
|
|
// if (notifPer) {
|
|
// if (kIsWeb) {
|
|
// NotificationServiceWeb.showNotification();
|
|
// } else {
|
|
// await NotificationSrviceAndroid.showCustomNotification();
|
|
// }
|
|
// }
|
|
// },
|
|
// child: Text('Show Notification')),
|
|
|
|
Flexible(
|
|
child: Container(
|
|
constraints: BoxConstraints(maxWidth: 800),
|
|
child: TextField(
|
|
textInputAction: TextInputAction.search,
|
|
onSubmitted: (value) {
|
|
print(value);
|
|
},
|
|
decoration: InputDecoration(
|
|
hintText: 'what are you looking for?',
|
|
suffixIcon: Padding(
|
|
padding: const EdgeInsets.all(12.0),
|
|
child: Assets.icon.outline.search.svg(
|
|
color: Theme.of(context).colorScheme.onSurface,
|
|
width: 16,
|
|
height: 16),
|
|
),
|
|
enabledBorder: defaultBorder,
|
|
border: defaultBorder),
|
|
),
|
|
)),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
desktop: Scaffold(
|
|
body: SizedBox(),
|
|
));
|
|
}
|
|
}
|