'Is there any way to place texview widgets on same horizontal line?
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.
Solution 1:[1]
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'),
),
])
],
),
);
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ali Punjabi |
