You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
|
buildInputContainerLimit(BuildContext context, TextEditingController user,
|
|
String title, bool enabled, int limit) {
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Text(
|
|
title,
|
|
style: TextStyle(
|
|
color: Theme.of(context).primaryColorLight,
|
|
fontSize: 14.0,
|
|
),
|
|
),
|
|
// SizedBox(
|
|
// height: 10.0,
|
|
// ),
|
|
TextField(
|
|
maxLengthEnforcement: MaxLengthEnforcement.enforced,
|
|
maxLength: limit,
|
|
enabled: enabled,
|
|
autocorrect: false,
|
|
textAlign: TextAlign.left,
|
|
controller: user,
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
color: Theme.of(context).primaryColorLight,
|
|
),
|
|
decoration: InputDecoration(
|
|
border: InputBorder.none,
|
|
contentPadding: EdgeInsets.only(top: 10.0),
|
|
// hintText: "Enter your " + first.toLowerCase() + " here",
|
|
hintStyle: TextStyle(color: Colors.grey),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|