how to put text over svg images in row in flutterFlutter SVG renderingHow do I shrink the child view like in the GridViewFlutter Layout: How can I put a Row inside a Flex (or another Row) in Flutter? Also using Stack widgetFlutter : Can I add a Header Row to a ListViewHow to underline text in flutterHow to offset a scaffold widget in Flutter?How to to display text over the images in Flutter?Flutter : Bad state: Stream has already been listened toHow to fix text scroll over image in flutterFlutter put row into row

Find position equal columns of matrix

Discretisation of region intersection in 3D

Do gauntlets count as armor?

Are there foods that astronauts are explicitly never allowed to eat?

Has anyone ever written a novel or short story composed of only dialogue?

What's a German word for »Sandbagger«?

Aren't all schwa sounds literally /ø/?

Remove side menu(right side) from finder

Do I care if the housing market has gone up or down, if I'm moving from one house to another?

Could a US citizen born through "birth tourism" become President?

What does Windows' "Tuning up Application Start" do?

A Real World Example for Divide and Conquer Method

How can electronics on board JWST survive the low operating temperature while it's difficult to survive lunar nights?

I want light controlled by one switch, not two

TCP connections hang during handshake

Is there an English word to describe when a sound "protrudes"?

When we are talking about black hole evaporation - what exactly happens?

Host telling me to cancel my booking in exchange for a discount?

What is the origin of "Wonder begets wisdom?"

How deep is the Underdark? What is its max and median depth?

Linearize or approximate a square root constraint

Is Bitcoin PoW actually SHA256 + Merkle generation? Or have I misunderstood coinbase/append?

Why is there an extra "t" in Lemmatization?

Brute-force the switchboard



how to put text over svg images in row in flutter


Flutter SVG renderingHow do I shrink the child view like in the GridViewFlutter Layout: How can I put a Row inside a Flex (or another Row) in Flutter? Also using Stack widgetFlutter : Can I add a Header Row to a ListViewHow to underline text in flutterHow to offset a scaffold widget in Flutter?How to to display text over the images in Flutter?Flutter : Bad state: Stream has already been listened toHow to fix text scroll over image in flutterFlutter put row into row






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















i have a row which contains two svg images and two text. i want some text should appear over svg images. please help me.thank you in advance



final heading_register=new Container(
color: const Color(0xFF008000),
padding: const EdgeInsets.all(5.0),
child: Row(

children: <Widget>[

Stack(
children: <Widget>[
svgIcon,
Center(child: Text("1")),
]
),


Expanded(
child: Text('New Registartion',style: new TextStyle(color: Colors.white,fontWeight: FontWeight.bold,fontSize: 16.0),),
),
Stack(
children: <Widget>[
svgIcon,
Text("1",textAlign: TextAlign.end,),
]
),
Expanded(
child: Text('Total Registartion',style: new TextStyle(color: Colors.white,fontWeight: FontWeight.bold,fontSize: 16.0),),
),
],
),
);









share|improve this question






















  • but text is not placeing to center of image

    – Pritham Bnr
    Mar 26 at 13:13


















0















i have a row which contains two svg images and two text. i want some text should appear over svg images. please help me.thank you in advance



final heading_register=new Container(
color: const Color(0xFF008000),
padding: const EdgeInsets.all(5.0),
child: Row(

children: <Widget>[

Stack(
children: <Widget>[
svgIcon,
Center(child: Text("1")),
]
),


Expanded(
child: Text('New Registartion',style: new TextStyle(color: Colors.white,fontWeight: FontWeight.bold,fontSize: 16.0),),
),
Stack(
children: <Widget>[
svgIcon,
Text("1",textAlign: TextAlign.end,),
]
),
Expanded(
child: Text('Total Registartion',style: new TextStyle(color: Colors.white,fontWeight: FontWeight.bold,fontSize: 16.0),),
),
],
),
);









share|improve this question






















  • but text is not placeing to center of image

    – Pritham Bnr
    Mar 26 at 13:13














0












0








0








i have a row which contains two svg images and two text. i want some text should appear over svg images. please help me.thank you in advance



final heading_register=new Container(
color: const Color(0xFF008000),
padding: const EdgeInsets.all(5.0),
child: Row(

children: <Widget>[

Stack(
children: <Widget>[
svgIcon,
Center(child: Text("1")),
]
),


Expanded(
child: Text('New Registartion',style: new TextStyle(color: Colors.white,fontWeight: FontWeight.bold,fontSize: 16.0),),
),
Stack(
children: <Widget>[
svgIcon,
Text("1",textAlign: TextAlign.end,),
]
),
Expanded(
child: Text('Total Registartion',style: new TextStyle(color: Colors.white,fontWeight: FontWeight.bold,fontSize: 16.0),),
),
],
),
);









share|improve this question














i have a row which contains two svg images and two text. i want some text should appear over svg images. please help me.thank you in advance



final heading_register=new Container(
color: const Color(0xFF008000),
padding: const EdgeInsets.all(5.0),
child: Row(

children: <Widget>[

Stack(
children: <Widget>[
svgIcon,
Center(child: Text("1")),
]
),


Expanded(
child: Text('New Registartion',style: new TextStyle(color: Colors.white,fontWeight: FontWeight.bold,fontSize: 16.0),),
),
Stack(
children: <Widget>[
svgIcon,
Text("1",textAlign: TextAlign.end,),
]
),
Expanded(
child: Text('Total Registartion',style: new TextStyle(color: Colors.white,fontWeight: FontWeight.bold,fontSize: 16.0),),
),
],
),
);






flutter






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 12:36









Pritham BnrPritham Bnr

256 bronze badges




256 bronze badges












  • but text is not placeing to center of image

    – Pritham Bnr
    Mar 26 at 13:13


















  • but text is not placeing to center of image

    – Pritham Bnr
    Mar 26 at 13:13

















but text is not placeing to center of image

– Pritham Bnr
Mar 26 at 13:13






but text is not placeing to center of image

– Pritham Bnr
Mar 26 at 13:13













1 Answer
1






active

oldest

votes


















0














You can use the Stack widget with alignment: Alignment.center. Alignment.center centers all children from the Stack in its center.



Small standalone example:



Demo



import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget
static const String example = 'The quick brown fox jumps over the lazy dog';

@override
Widget build(BuildContext context)
return MaterialApp(
home: Scaffold(
body: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
IconWithText(text: 'Home', icon: Icons.home),
IconWithText(text: 'Car', icon: Icons.directions_car)
],
),
)
),
);



class IconWithText extends StatelessWidget
final IconData icon;
final String text;

IconWithText(this.icon, this.text);

@override
Widget build(BuildContext context)
return Stack(
alignment: Alignment.center,
children: <Widget>[
Icon(icon, color: Colors.red, size: 60.0,),
Text(text, style: TextStyle(fontSize: 30.0),)
],
);







share|improve this answer























  • alignment=center working fine thanks

    – Pritham Bnr
    Mar 26 at 13:39










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55357370%2fhow-to-put-text-over-svg-images-in-row-in-flutter%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














You can use the Stack widget with alignment: Alignment.center. Alignment.center centers all children from the Stack in its center.



Small standalone example:



Demo



import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget
static const String example = 'The quick brown fox jumps over the lazy dog';

@override
Widget build(BuildContext context)
return MaterialApp(
home: Scaffold(
body: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
IconWithText(text: 'Home', icon: Icons.home),
IconWithText(text: 'Car', icon: Icons.directions_car)
],
),
)
),
);



class IconWithText extends StatelessWidget
final IconData icon;
final String text;

IconWithText(this.icon, this.text);

@override
Widget build(BuildContext context)
return Stack(
alignment: Alignment.center,
children: <Widget>[
Icon(icon, color: Colors.red, size: 60.0,),
Text(text, style: TextStyle(fontSize: 30.0),)
],
);







share|improve this answer























  • alignment=center working fine thanks

    – Pritham Bnr
    Mar 26 at 13:39















0














You can use the Stack widget with alignment: Alignment.center. Alignment.center centers all children from the Stack in its center.



Small standalone example:



Demo



import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget
static const String example = 'The quick brown fox jumps over the lazy dog';

@override
Widget build(BuildContext context)
return MaterialApp(
home: Scaffold(
body: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
IconWithText(text: 'Home', icon: Icons.home),
IconWithText(text: 'Car', icon: Icons.directions_car)
],
),
)
),
);



class IconWithText extends StatelessWidget
final IconData icon;
final String text;

IconWithText(this.icon, this.text);

@override
Widget build(BuildContext context)
return Stack(
alignment: Alignment.center,
children: <Widget>[
Icon(icon, color: Colors.red, size: 60.0,),
Text(text, style: TextStyle(fontSize: 30.0),)
],
);







share|improve this answer























  • alignment=center working fine thanks

    – Pritham Bnr
    Mar 26 at 13:39













0












0








0







You can use the Stack widget with alignment: Alignment.center. Alignment.center centers all children from the Stack in its center.



Small standalone example:



Demo



import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget
static const String example = 'The quick brown fox jumps over the lazy dog';

@override
Widget build(BuildContext context)
return MaterialApp(
home: Scaffold(
body: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
IconWithText(text: 'Home', icon: Icons.home),
IconWithText(text: 'Car', icon: Icons.directions_car)
],
),
)
),
);



class IconWithText extends StatelessWidget
final IconData icon;
final String text;

IconWithText(this.icon, this.text);

@override
Widget build(BuildContext context)
return Stack(
alignment: Alignment.center,
children: <Widget>[
Icon(icon, color: Colors.red, size: 60.0,),
Text(text, style: TextStyle(fontSize: 30.0),)
],
);







share|improve this answer













You can use the Stack widget with alignment: Alignment.center. Alignment.center centers all children from the Stack in its center.



Small standalone example:



Demo



import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget
static const String example = 'The quick brown fox jumps over the lazy dog';

@override
Widget build(BuildContext context)
return MaterialApp(
home: Scaffold(
body: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
IconWithText(text: 'Home', icon: Icons.home),
IconWithText(text: 'Car', icon: Icons.directions_car)
],
),
)
),
);



class IconWithText extends StatelessWidget
final IconData icon;
final String text;

IconWithText(this.icon, this.text);

@override
Widget build(BuildContext context)
return Stack(
alignment: Alignment.center,
children: <Widget>[
Icon(icon, color: Colors.red, size: 60.0,),
Text(text, style: TextStyle(fontSize: 30.0),)
],
);








share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 26 at 13:35









NiklasNiklas

1,5017 silver badges18 bronze badges




1,5017 silver badges18 bronze badges












  • alignment=center working fine thanks

    – Pritham Bnr
    Mar 26 at 13:39

















  • alignment=center working fine thanks

    – Pritham Bnr
    Mar 26 at 13:39
















alignment=center working fine thanks

– Pritham Bnr
Mar 26 at 13:39





alignment=center working fine thanks

– Pritham Bnr
Mar 26 at 13:39








Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55357370%2fhow-to-put-text-over-svg-images-in-row-in-flutter%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript