mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-29 16:49:10 +08:00
123 lines
3.8 KiB
Dart
123 lines
3.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'common.dart';
|
|
|
|
class HomePage extends StatefulWidget {
|
|
HomePage({Key key, this.title}) : super(key: key);
|
|
|
|
final String title;
|
|
|
|
@override
|
|
_HomePageState createState() => _HomePageState();
|
|
}
|
|
|
|
class _HomePageState extends State<HomePage> {
|
|
int _counter = 0;
|
|
|
|
void _incrementCounter() {
|
|
setState(() {
|
|
_counter++;
|
|
});
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
// This method is rerun every time setState is called
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: Text(widget.title),
|
|
),
|
|
body: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: <Widget>[
|
|
Text(
|
|
'You have pushed the button this many times:',
|
|
),
|
|
Text(
|
|
'$_counter',
|
|
style: Theme.of(context).textTheme.headline4,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
floatingActionButton: FloatingActionButton(
|
|
onPressed: _incrementCounter,
|
|
tooltip: 'Increment',
|
|
child: Icon(Icons.add),
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget getSearchBarUI() {
|
|
return Padding(
|
|
padding: const EdgeInsets.only(top: 8.0, left: 18),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Container(
|
|
width: MediaQuery.of(context).size.width * 0.75,
|
|
height: 64,
|
|
child: Padding(
|
|
padding: const EdgeInsets.only(top: 8, bottom: 8),
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
color: HexColor('#F8FAFB'),
|
|
borderRadius: const BorderRadius.only(
|
|
bottomRight: Radius.circular(13.0),
|
|
bottomLeft: Radius.circular(13.0),
|
|
topLeft: Radius.circular(13.0),
|
|
topRight: Radius.circular(13.0),
|
|
),
|
|
),
|
|
child: Row(
|
|
children: <Widget>[
|
|
Expanded(
|
|
child: Container(
|
|
padding: const EdgeInsets.only(left: 16, right: 16),
|
|
child: TextFormField(
|
|
style: TextStyle(
|
|
fontFamily: 'WorkSans',
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 16,
|
|
color: Color(0xFF00B6F0),
|
|
),
|
|
keyboardType: TextInputType.text,
|
|
decoration: InputDecoration(
|
|
labelText: 'Search for course',
|
|
border: InputBorder.none,
|
|
helperStyle: TextStyle(
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 16,
|
|
color: HexColor('#B9BABC'),
|
|
),
|
|
labelStyle: TextStyle(
|
|
fontWeight: FontWeight.w600,
|
|
fontSize: 16,
|
|
letterSpacing: 0.2,
|
|
color: HexColor('#B9BABC'),
|
|
),
|
|
),
|
|
onEditingComplete: () {},
|
|
),
|
|
),
|
|
),
|
|
SizedBox(
|
|
width: 60,
|
|
height: 60,
|
|
child: Icon(Icons.search, color: HexColor('#B9BABC')),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
const Expanded(
|
|
child: SizedBox(),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|