mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-18 11:20:16 +08:00
28 lines
706 B
Dart
28 lines
706 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class NoteTitleEditor extends StatelessWidget {
|
|
final TextEditingController textController;
|
|
final Function onChanged;
|
|
|
|
NoteTitleEditor(this.textController, this.onChanged);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
var style = Theme.of(context).textTheme.headline6;
|
|
|
|
return TextField(
|
|
keyboardType: TextInputType.text,
|
|
style: style,
|
|
decoration: const InputDecoration(
|
|
hintText: 'Title',
|
|
border: InputBorder.none,
|
|
isDense: true,
|
|
),
|
|
controller: textController,
|
|
textCapitalization: TextCapitalization.sentences,
|
|
maxLines: null,
|
|
onChanged: (_) => onChanged(),
|
|
);
|
|
}
|
|
}
|