Convert Int Variable to String Data
Complete Code For In Flutter
main.dart
import 'package:flutter/material.dart'; void main(){ runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: MyHomePage(), ); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> with SingleTickerProviderStateMixin { int value = 2034567890 ; String holder ; changeType(){ setState(() { holder = value.toString(); }); } @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.black, appBar: AppBar( backgroundColor: Colors.pink[900], title: Text('Convert Int Integer Variable'), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Container( padding: EdgeInsets.fromLTRB(0, 10, 0, 10), child: Text('$value', style: TextStyle(fontSize: 22,color: Colors.white),)), RaisedButton( onPressed: () => changeType(), child: Text('Convert Int Type to String on Button Click'), textColor: Colors.white, color: Colors.pink[900], padding: EdgeInsets.fromLTRB(10, 10, 10, 10), ) ])) ); } }