|
@@ -3,6 +3,9 @@ import 'package:flutter/material.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:taskservice/Common/JXColors.dart';
|
|
import 'package:taskservice/Common/JXColors.dart';
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * 导航栏
|
|
|
|
+* */
|
|
class MyScaffold extends StatelessWidget {
|
|
class MyScaffold extends StatelessWidget {
|
|
final Widget body;
|
|
final Widget body;
|
|
final String title;
|
|
final String title;
|
|
@@ -24,6 +27,9 @@ class MyScaffold extends StatelessWidget {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * 搜索控件
|
|
|
|
+ * */
|
|
class SearchBar extends StatefulWidget {
|
|
class SearchBar extends StatefulWidget {
|
|
final Function(String value) onTextChanged;
|
|
final Function(String value) onTextChanged;
|
|
final String hint;
|
|
final String hint;
|
|
@@ -92,3 +98,58 @@ class _SearchBarState extends State<SearchBar> {
|
|
);
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * 编辑cell
|
|
|
|
+ * */
|
|
|
|
+class EditCell extends StatefulWidget {
|
|
|
|
+ final String mark;
|
|
|
|
+ final String hint;
|
|
|
|
+ final Function(String value) onEditingComplete;
|
|
|
|
+ final TextEditingController controller;
|
|
|
|
+ EditCell({this.mark, this.hint, this.controller, this.onEditingComplete});
|
|
|
|
+ @override
|
|
|
|
+ _EditCell createState() => _EditCell();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+class _EditCell extends State<EditCell> {
|
|
|
|
+ @override
|
|
|
|
+ Widget build(BuildContext context) {
|
|
|
|
+ // TODO: implement build
|
|
|
|
+ return Row(
|
|
|
|
+ mainAxisSize: MainAxisSize.max,
|
|
|
|
+ children: <Widget>[
|
|
|
|
+ SizedBox(
|
|
|
|
+ width: 20,
|
|
|
|
+ ),
|
|
|
|
+ Text(
|
|
|
|
+ widget.mark,
|
|
|
|
+ style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
|
|
|
+ ),
|
|
|
|
+ Expanded(
|
|
|
|
+ child: Padding(
|
|
|
|
+ padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
|
|
+ child: TextField(
|
|
|
|
+ controller: widget.controller,
|
|
|
|
+ maxLines: 1,
|
|
|
|
+ obscureText: false,
|
|
|
|
+ cursorColor: JXColors.k1F2529,
|
|
|
|
+ decoration: InputDecoration(
|
|
|
|
+ //border: InputBorder.none,
|
|
|
|
+ hintText: widget.hint,
|
|
|
|
+ labelStyle: TextStyle(
|
|
|
|
+ color: JXColors.k2E3032,
|
|
|
|
+ fontSize: 16.0,
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+ onEditingComplete: widget.onEditingComplete(widget.controller.text),
|
|
|
|
+ ),
|
|
|
|
+ )),
|
|
|
|
+ ],
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|