Code
Copy
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Hello World',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Hello World App'),
),
body: Center(
child: Text(
'Hello, World!',
style: TextStyle(fontSize: 24),
),
),
);
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Hello World App'),
),
body: Center(
child: Text(
'Hello, World!',
style: TextStyle(fontSize: 24),
),
),
);
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Hello World App'),
),
body: Center(
child: Text(
'Hello, World!',
style: TextStyle(fontSize: 24),
),
),
);
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Hello World App'),
),
body: Center(
child: Text(
'Hello, World!',
style: TextStyle(fontSize: 24),
),
),
);
}
}
<style>
.copied-btn1 {
display: flex;
justify-content: space-between;
align-items: center;
}
.code-block1 {
background-color: #fafafa;
padding: 7px;
border-radius: 6px;
border: 0.5px solid #aaa;
}
.paragrghbg {
background-color: #000;
color: #fff;
padding: 5px;
border-radius: 4px;
overflow-y: auto;
height: 30vh; /* Corrected */
}
.code-content1 {
font-family: Sans-Serif;
font-size: 14px;
font-weight: 500;
color: #aaa;
}
.copy-btn-cls1 {
display: flex;
align-items: center;
border: none;
background-color: transparent;
}
.copy-btn-text1 {
margin-left: 5px;
}
.code-content2 {
display: none;
}
.copy-icon1 {
width: 16px;
height: 16px;
}
</style>