git-touch-android-ios-app/lib/widgets/text_field.dart

22 lines
632 B
Dart
Raw Normal View History

2022-09-24 20:46:37 +02:00
import 'package:antd_mobile/antd_mobile.dart';
2020-02-01 10:18:21 +01:00
import 'package:flutter/cupertino.dart';
import 'package:git_touch/models/theme.dart';
import 'package:provider/provider.dart';
class MyTextField extends StatelessWidget {
2022-09-21 18:28:21 +02:00
const MyTextField({required this.controller, this.placeholder});
2020-02-01 10:18:21 +01:00
final TextEditingController controller;
2021-05-16 09:16:35 +02:00
final String? placeholder;
2020-02-01 10:18:21 +01:00
@override
Widget build(BuildContext context) {
final theme = Provider.of<ThemeModel>(context);
2022-09-17 14:46:39 +02:00
return CupertinoTextField(
controller: controller,
placeholder: placeholder,
2022-09-24 20:46:37 +02:00
style: TextStyle(color: AntTheme.of(context).colorText),
2022-09-17 14:46:39 +02:00
);
2020-02-01 10:18:21 +01:00
}
}