1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- import 'package:autocomplete_textfield/autocomplete_textfield.dart';
- import 'package:flutter/material.dart';
- import 'package:get_it/get_it.dart';
- import 'package:ustest/BuildHistoryList.dart';
- import 'Services/BuildService.dart';
- import 'Services/NotificationReceivedArgs.dart';
- class AutoTestView extends StatefulWidget {
- @override
- State<StatefulWidget> createState() {
- // TODO: implement createState
- return _AutoTestView();
- }
- }
- class _AutoTestView extends State<AutoTestView> {
- String? selectedType = "我申请的";
- @override
- Widget build(BuildContext context) {
- final items = <String>["我申请的", "我组织的", "我参与的"];
- int selectedState = 0;
- if (selectedType == "我申请的") {
- selectedState = 0;
- } else if (selectedType == "我组织的") {
- selectedState = 1;
- } else {
- selectedState = 2;
- }
- GlobalKey<AutoCompleteTextFieldState<String>> typeKey = GlobalKey();
- GlobalKey listKey = GlobalKey();
- return Scaffold(
- body: Center(
- child: Column(
- children: [
- Row(
- children: [],
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: DropdownButtonFormField<String>(
- key: typeKey,
- value: selectedType,
- decoration: InputDecoration(hintText: "Select one state"),
- items: items
- .map((e) => DropdownMenuItem<String>(
- child: Text(e),
- value: e,
- ))
- .toList(),
- onChanged: (value) {
- selectedType = value;
- },
- )),
- Row(
- children: [
- TextButton.icon(
- onPressed: () => setState(() {}),
- icon: Icon(Icons.search),
- label: Text("Search")),
- ],
- ),
- Expanded(child: Center()),
- ],
- ),
- ),
- );
- }
- }
|