Is there any way to place texview widgets on same horizontal line?

78 views Asked by At

I have made a custom button that looks like a radio button using texview inkwell and want to place it adjacent to a text in a multiple choice question.

1

There are 1 answers

0
Ali Punjabi On

Here is a complete working code to get the idea:

import 'package:flutter/material.dart';

 void main() {
 runApp(new MaterialApp(
 title: 'title',
 home: new MyApp(),
 ));
}

 class MyApp extends StatelessWidget {
 @override
 Widget build(BuildContext context) {
 return Scaffold(
  body: Column(
    mainAxisAlignment: MainAxisAlignment.start,
    children: <Widget>[
      
      Text(
        'What is your name?',
        style: TextStyle(color: Colors.blue, fontWeight: 
  FontWeight.bold),
      ),
      Row(children: <Widget>[
        ElevatedButton(
          child: Text('Your Custom Button'),
          onPressed: null,
        ),
        Padding(
          padding: const EdgeInsets.all(8.0),
          child: Text('Muhammad'),
        ),
      ])
    ],
  ),
);
}
}