border_icon_button.dart

import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( backgroundColor: Colors.lightBlue, body: Center( child: BorderIconButton(), ), ), ); } } class BorderIconButton extends StatelessWidget { @override Widget build(BuildContext context) { return Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Material( shape: const CircleBorder( side: BorderSide(color: Colors.white, width: 4)), elevation: 6, color: Theme.of(context).accentColor, child: InkWell( customBorder: CircleBorder(), onTap: () {}, child: const Padding( padding: EdgeInsets.all(10), child: Icon( Icons.flight, size: 60, color: Colors.white, ), ), ), ), const SizedBox(height: 10), const Text( 'Citabria\n7ECA', textAlign: TextAlign.center, style: TextStyle( fontWeight: FontWeight.w500, color: Colors.white, ), ), ], ); } }
A Flutter button comprising a raised icon with a border and some text

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.