LoginSignup
4
0

More than 3 years have passed since last update.

[Flutter] FlatButton 間の空白をなくす

Last updated at Posted at 2019-03-03

結論

materialTapTargetSize プロパティで、shrinkWrap を指定すればいける

FlatButton(
      materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, // これ
      child: Text("sample"),
      color: Colors.red,
      onPressed: () => print("sample"),
    );

padded → const MaterialTapTargetSize
Expands the minimum tap target size to 48px by 48px.
This is the default value of ThemeData.materialHitTestSize and the recommended size to conform to Android accessibility scanner recommendations.

4
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
0