how add labeltext to the container in flutter

import ‘package:flutter/material.dart’;

void main() {
runApp(const MyApp());
}

class MyApp extends StatelessWidget {
const MyApp({super.key});

// This widget is the root of your application.
@override
Widget build(BuildContext contex…


This content originally appeared on DEV Community and was authored by NJ


import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const Home(),
      debugShowCheckedModeBanner: false,
    );
  }
}

class Home extends StatefulWidget {
  const Home({super.key});

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Container(
          height: 100,
          width: 400,
          child: InputDecorator(
            decoration: InputDecoration(
                labelText: 'Box',
                border: OutlineInputBorder(
                  borderRadius: BorderRadius.circular(10),
                )),
            child: Text("Container Content"),
          ),
        ),
      ),
    );
  }
}


This content originally appeared on DEV Community and was authored by NJ


Print Share Comment Cite Upload Translate Updates
APA

NJ | Sciencx (2023-04-05T06:33:33+00:00) how add labeltext to the container in flutter. Retrieved from https://www.scien.cx/2023/04/05/how-add-labeltext-to-the-container-in-flutter/

MLA
" » how add labeltext to the container in flutter." NJ | Sciencx - Wednesday April 5, 2023, https://www.scien.cx/2023/04/05/how-add-labeltext-to-the-container-in-flutter/
HARVARD
NJ | Sciencx Wednesday April 5, 2023 » how add labeltext to the container in flutter., viewed ,<https://www.scien.cx/2023/04/05/how-add-labeltext-to-the-container-in-flutter/>
VANCOUVER
NJ | Sciencx - » how add labeltext to the container in flutter. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/04/05/how-add-labeltext-to-the-container-in-flutter/
CHICAGO
" » how add labeltext to the container in flutter." NJ | Sciencx - Accessed . https://www.scien.cx/2023/04/05/how-add-labeltext-to-the-container-in-flutter/
IEEE
" » how add labeltext to the container in flutter." NJ | Sciencx [Online]. Available: https://www.scien.cx/2023/04/05/how-add-labeltext-to-the-container-in-flutter/. [Accessed: ]
rf:citation
» how add labeltext to the container in flutter | NJ | Sciencx | https://www.scien.cx/2023/04/05/how-add-labeltext-to-the-container-in-flutter/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.