46 lines
1.4 KiB
Dart
46 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
||
import 'package:get/get.dart';
|
||
import 'package:rogapp/pages/search/search_page.dart';
|
||
|
||
// 要検討:SearchPageへのナビゲーションにNavigator.pushを使用していますが、一貫性のためにGet.toやGet.toNamedを使用することを検討してください。
|
||
//
|
||
class HomePage extends GetView{
|
||
const HomePage({Key? key}) : super(key: key);
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return Scaffold(
|
||
appBar: AppBar(
|
||
elevation: 0,
|
||
backgroundColor: Colors.white,
|
||
title: Row(
|
||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
Text("app_title".tr,
|
||
style: const TextStyle(
|
||
color: Colors.blue
|
||
),
|
||
),
|
||
InkWell(
|
||
onTap: (){
|
||
Navigator.push(context, MaterialPageRoute(builder: (context) => SearchPage()));
|
||
},
|
||
child: Container(
|
||
height: 32,
|
||
width: 75,
|
||
decoration: BoxDecoration(
|
||
color: Colors.blue,
|
||
borderRadius: BorderRadius.circular(25),
|
||
|
||
),
|
||
child: const Center(child: Icon(Icons.search),),
|
||
),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
body: Container(),
|
||
);
|
||
}
|
||
|
||
} |