Removing the ripple effect
This commit is contained in:
parent
330eb928d7
commit
aa20bfc716
5 changed files with 76 additions and 74 deletions
|
@ -66,3 +66,7 @@ Breaking change:
|
|||
|
||||
* Full support for input decoration
|
||||
* New standardized usage, many deprecations
|
||||
|
||||
##1.0.1
|
||||
|
||||
* Removing the ripple effect
|
||||
|
|
|
@ -15,7 +15,7 @@ In the `pubspec.yaml` of your flutter project, add the following dependency:
|
|||
```yaml
|
||||
dependencies:
|
||||
...
|
||||
date_field: ^1.0.0
|
||||
date_field: ^1.0.1
|
||||
```
|
||||
|
||||
In your library add the following import:
|
||||
|
|
|
@ -12,8 +12,10 @@ class MyApp extends StatelessWidget {
|
|||
return MaterialApp(
|
||||
title: 'Flutter Demo',
|
||||
theme: ThemeData(
|
||||
inputDecorationTheme:
|
||||
const InputDecorationTheme(border: OutlineInputBorder()),
|
||||
inputDecorationTheme: const InputDecorationTheme(
|
||||
border: OutlineInputBorder()
|
||||
),
|
||||
|
||||
primarySwatch: Colors.blue,
|
||||
),
|
||||
home: MyHomePage(),
|
||||
|
@ -21,6 +23,7 @@ class MyApp extends StatelessWidget {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
@override
|
||||
_MyHomePageState createState() => _MyHomePageState();
|
||||
|
@ -31,6 +34,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Scaffold(
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
|
@ -46,13 +50,15 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
),
|
||||
DateTimeField(
|
||||
decoration: const InputDecoration(
|
||||
hintText: 'Please select your birthday date and time'),
|
||||
hintText: 'Please select your birthday date and time'
|
||||
),
|
||||
selectedDate: selectedDate,
|
||||
onDateSelected: (DateTime value) {
|
||||
setState(() {
|
||||
selectedDate = value;
|
||||
});
|
||||
}),
|
||||
}
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 20.0),
|
||||
child: Text('DateTimeFormField'),
|
||||
|
@ -69,8 +75,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
labelText: 'My Super Date Time Field',
|
||||
),
|
||||
autovalidateMode: AutovalidateMode.always,
|
||||
validator: (e) =>
|
||||
(e?.day ?? 0) == 1 ? 'Please not the first day' : null,
|
||||
validator: (e) => (e?.day ?? 0) == 1 ? 'Please not the first day' : null,
|
||||
onDateSelected: (DateTime value) {
|
||||
print(value);
|
||||
},
|
||||
|
@ -86,8 +91,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
),
|
||||
mode: DateTimeFieldPickerMode.time,
|
||||
autovalidateMode: AutovalidateMode.always,
|
||||
validator: (e) =>
|
||||
(e?.day ?? 0) == 1 ? 'Please not the first day' : null,
|
||||
validator: (e) => (e?.day ?? 0) == 1 ? 'Please not the first day' : null,
|
||||
onDateSelected: (DateTime value) {
|
||||
print(value);
|
||||
},
|
||||
|
@ -97,6 +101,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -312,16 +312,9 @@ class _InputDropdown extends StatelessWidget {
|
|||
suffixIcon: const Icon(Icons.arrow_drop_down),
|
||||
).applyDefaults(Theme.of(context).inputDecorationTheme);
|
||||
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
borderRadius: inkwellBorderRadius,
|
||||
onTap: onPressed,
|
||||
child: InputDecorator(
|
||||
return InputDecorator(
|
||||
decoration: effectiveDecoration,
|
||||
child: Text(text, style: textStyle),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: date_field
|
||||
description: A widget in the form of a field that lets people enter choose a date/time/date and time via a date/time picker dialog.
|
||||
version: 1.0.0
|
||||
version: 1.0.1
|
||||
homepage: 'https://github.com/GaspardMerten/date_field'
|
||||
|
||||
environment:
|
||||
|
|
Loading…
Reference in a new issue