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

21 lines
573 B
Dart

import 'package:flutter/cupertino.dart';
import 'package:git_touch/models/theme.dart';
import 'package:provider/provider.dart';
class MyTextField extends StatelessWidget {
final TextEditingController controller;
final String? placeholder;
const MyTextField({required this.controller, this.placeholder});
@override
Widget build(BuildContext context) {
final theme = Provider.of<ThemeModel>(context);
return CupertinoTextField(
controller: controller,
placeholder: placeholder,
style: TextStyle(color: theme.palette.text),
);
}
}