Search
 
SCRIPT & CODE EXAMPLE
 

DART

circular elevated button flutter

    //circular elevated button
              ElevatedButton(
                style: ElevatedButton.styleFrom(
                  shape: const CircleBorder(),
                ),
                onPressed: () {},
                child: const Icon(Icons.refresh),
              ),
Comment

circular elevated button flutter

style: ElevatedButton.styleFrom(
	shape: CircleBorder(),
),
Comment

circular button in flutter

Container(
                      width: 90,
                      height: 90,
                      child: RaisedButton(onPressed: (){
                      },
                        color: Colors.deepOrange,  
                        textColor: Colors.white,
                        shape: CircleBorder(side: BorderSide.none),
                        child: Text('Login',style: TextStyle(
                            fontSize: 20.0
                        ),
                        ),
                      ),
                    )
Comment

how to make a circular button shape in flutter

// 1
ElevatedButton(
          child: const Text(
            'Button',
            style: TextStyle(fontSize: 24),
          ),
          onPressed: () {},
          style: ElevatedButton.styleFrom(
              fixedSize: const Size(200, 200)
              shape: const CircleBorder(), 
          ),
),

// 2
MaterialButton(
        color: Colors.blue,
        shape: const CircleBorder(),
        onPressed: () {},
        child: const Padding(
          padding: EdgeInsets.all(100),
          child: Text(
            'A circle button',
            style: TextStyle(color: Colors.white, fontSize: 24),
          ),
        ),
),

// 3
GestureDetector(
            onTap: () {
              print('Button tapped');
            },
            child: const CircleAvatar(
              radius: 100,
              backgroundColor: Colors.indigo,
              child: Text(
                'A Button',
                style: TextStyle(fontSize: 30),
              ),
)),

// 4
ElevatedButton(
        style: ElevatedButton.styleFrom(
            shape: const CircleBorder(), primary: Colors.red),
        child: Container(
          width: 200,
          height: 200,
          alignment: Alignment.center,
          decoration: const BoxDecoration(shape: BoxShape.circle),
          child: const Text(
            'I am a button',
            style: TextStyle(fontSize: 24),
          ),
        ),
        onPressed: () {},
),

// 5
ClipRRect(
          borderRadius: BorderRadius.circular(120),
          child: SizedBox(
            width: 240,
            height: 240,
            child: ElevatedButton.icon(
              icon: const Icon(
                Icons.camera,
                size: 40,
              ),
              label: const Text(
                'Camera',
                style: TextStyle(fontSize: 25),
              ),
              onPressed: () {},
            ),
          ),
),
Comment

how to make a circular button shape in flutter

// 1
ElevatedButton(
          child: const Text(
            'Button',
            style: TextStyle(fontSize: 24),
          ),
          onPressed: () {},
          style: ElevatedButton.styleFrom(
              fixedSize: const Size(200, 200)
              shape: const CircleBorder(), 
          ),
),

// 2
MaterialButton(
        color: Colors.blue,
        shape: const CircleBorder(),
        onPressed: () {},
        child: const Padding(
          padding: EdgeInsets.all(100),
          child: Text(
            'A circle button',
            style: TextStyle(color: Colors.white, fontSize: 24),
          ),
        ),
),

// 3
GestureDetector(
            onTap: () {
              print('Button tapped');
            },
            child: const CircleAvatar(
              radius: 100,
              backgroundColor: Colors.indigo,
              child: Text(
                'A Button',
                style: TextStyle(fontSize: 30),
              ),
)),

// 4
ElevatedButton(
        style: ElevatedButton.styleFrom(
            shape: const CircleBorder(), primary: Colors.red),
        child: Container(
          width: 200,
          height: 200,
          alignment: Alignment.center,
          decoration: const BoxDecoration(shape: BoxShape.circle),
          child: const Text(
            'I am a button',
            style: TextStyle(fontSize: 24),
          ),
        ),
        onPressed: () {},
),

// 5
ClipRRect(
          borderRadius: BorderRadius.circular(120),
          child: SizedBox(
            width: 240,
            height: 240,
            child: ElevatedButton.icon(
              icon: const Icon(
                Icons.camera,
                size: 40,
              ),
              label: const Text(
                'Camera',
                style: TextStyle(fontSize: 25),
              ),
              onPressed: () {},
            ),
          ),
),
Comment

PREVIOUS NEXT
Code Example
Dart :: flutter firestore timestamp to datetime 
Dart :: How can I add shadow to the widget in flutter? 
Dart :: hide debug flag flutter 
Dart :: flutter snackbar color 
Dart :: flutter chip delete 
Dart :: flutter check if key exists 
Dart :: flutter await http.get timeout 
Dart :: how to use hexadecimal color in flutter 
Dart :: dart move item in stack to bottom 
Dart :: dart loop through map 
Dart :: close drawer flutter 
Dart :: flutter text button 
Dart :: underscore dart 
Dart :: DartPad localStorage 
Dart :: Flutter how to use ListTile Threeline 
Dart :: make text filed round flutter 
Dart :: dart reverse list 
Dart :: empty widget flutter 
Dart :: flutter getx arguments 
Dart :: flutter pretext on textfield 
Dart :: 2d array flutter 
Dart :: shape property of card in flutter 
Dart :: cupertino icons flutter 
Dart :: base64encode flutter 
Dart :: find and update element in list dart 
Dart :: how to do type casting in dart for string 
Dart :: Flutter bottom navigation bar change page programmatically 
Dart :: dart singleton 
Dart :: flutter copy 
Dart :: paste clipboard flutter 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =