I like to create constants in a separate file for the BoxDecoration and other hard-coded values e.g.
const kCards = BorderRadius.only(
bottomLeft: Radius.circular(5),
bottomRight: Radius.circular(5),
topLeft: Radius.circular(20),
topRight: Radius.circular(20),
);
And then call the const kCards in the decoration: kCards,
It makes your code much cleaner and of course follows DRY-Do not Repeat Yourself.
If you want to make any adjustments to specific buttons/tiles etc use
e.g....
gradientButton.copyWith(color: Colors.blue),
borderRadius.copyWith(bottomLeft: Radius.circular(20),),
Another example but with hard-coded values
ListTile(
title: TextField(
controller: _email,
decoration: InputDecoration(
labelText: 'Email',
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10.0),
),
),
),
),
ListView specific Example with ClipRect
ListView(
shrinkWrap: true,
children: [
ClipRect(
child: TextField(
controller: _email,
decoration: const InputDecoration(
labelText: 'Email',
border: OutlineInputBorder(),
),
),
),
const SizedBox(height: 10),
ClipRect(
child: TextField(
controller: _password,
obscureText: true,
decoration: const InputDecoration(
labelText: 'Password',
border: OutlineInputBorder(),
),
),
),
const SizedBox(height: 10),
],
),