Flutter Tutorials

Flutter app development tutorials


flutter – OutlinedButton full width

main.dart


import 'package:flutter/material.dart';

void main(){
  runApp(
    MaterialApp(
      theme: ThemeData(primarySwatch: Colors.pink),
      home: Scaffold(
          appBar: AppBar(
              title: const Text("Flutter - OutlinedButton Full Width")
          ),
          body: Container(
            alignment: Alignment.center,
            padding: const EdgeInsets.all(8),
            child: OutlinedButton(
                onPressed: (){},
                child: const Text("Click Me"),
                style: OutlinedButton.styleFrom(
                    fixedSize: const Size(double.maxFinite, 0)
                )
            ),
          )
      ),
    ),
  );
}

More flutter tutorials



About Me

Flutter Developer

Design a site like this with WordPress.com
Get started