Started Porting Progress Creation Screen

Signed-off-by: Andreas Fahrecker <AndreasFahrecker@gmail.com>
This commit is contained in:
Andreas Fahrecker
2021-03-16 16:33:46 +01:00
parent 45d4f7ba3a
commit aabeef6384
6 changed files with 212 additions and 24 deletions

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
import 'package:time_progress_tracker/models/time_progress.dart';
import 'package:time_progress_tracker/ui/buttons/date_picker_btn.dart';
@ -64,14 +65,25 @@ class _ProgressEditorWidgetState extends State<ProgressEditorWidget> {
Widget build(BuildContext context) {
List<Widget> columnChildren = [
Expanded(
child: TextField(
controller: _nameTextController,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: "Progress Name",
errorText: _validName
? null
: "The Name need to have at least 3 and at max 20 symbols.",
child: Center(
child: PlatformTextField(
controller: _nameTextController,
material: (context, platform) => MaterialTextFieldData(
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: "Progress Name",
errorText: _validName
? null
: "The Name need to have at least 3 and at max 20 symbols.",
),
),
cupertino: (context, platform) => CupertinoTextFieldData(
placeholder: "Progress Name",
decoration: BoxDecoration(
border: Border.all(width: 2, color: Colors.grey),
borderRadius: BorderRadius.circular(32),
)
),
),
),
),