import 'package:flutter/material.dart';
void main() {
runApp(
Text(
'hedafaf',
textDirection: TextDirection.ltr,
style: TextStyle(
color: Colors.red,
fontSize: 23,
fontWeight: FontWeight.bold,
),
textAlign: TextAlign.center,
maxLines: 3,
overflow: TextOverflow.fade,
),
);
}
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: const Icon(
Icons.add_a_photo,
size: 50,
// color: Colors.red,
// color: Color(0xddffee33),
color: Color.fromARGB(255, 34, 34, 34),
)));
}
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: Center(
child: ElevatedButton(
child: Text('按钮'),
onPressed: () {
print('点击了按钮');
},
))));
}
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home : Scaffold(
body: Container(
color: Colors.blue,
margin: EdgeInsets.only(top: 20, left: 40),
padding: EdgeInsets.only(top: 10, bottom: 20, left: 30, right: 40),
child: Text(
'hedafaf',
textDirection: TextDirection.ltr,
style: TextStyle(
color: Colors.red,
fontSize: 23,
fontWeight: FontWeight.bold,
),
textAlign: TextAlign.center,
maxLines: 3,
overflow: TextOverflow.fade,
),
),
),
)
);
}
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home : Scaffold(
body: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.blue,
borderRadius: BorderRadius.circular(20),
border: Border.all(
color: Colors.black,
width: 3,
),
),
margin: EdgeInsets.only(top: 20, left: 40),
padding: EdgeInsets.only(top: 10, bottom: 20, left: 30, right: 40),
child: Text(
'hedafaf ' * 104,
textDirection: TextDirection.ltr,
style: TextStyle(
color: Colors.red,
fontSize: 24,
),
textAlign: TextAlign.left,
maxLines: 3,
overflow: TextOverflow.ellipsis,
),
),
),
)
);
}
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home : Scaffold(
body: Container(
width: 200,
height: 600,
alignment: Alignment.center,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.blue,
borderRadius: BorderRadius.circular(20),
border: Border.all(
color: Colors.black,
width: 4,
),
),
margin: EdgeInsets.only(top: 20, left: 40),
padding: EdgeInsets.only(top: 10, bottom: 20, left: 30, right: 40),
child: Text(
'hedafaf ' * 104,
textDirection: TextDirection.ltr,
style: TextStyle(
color: Colors.red,
fontSize: 24,
),
textAlign: TextAlign.left,
maxLines: 3,
overflow: TextOverflow.ellipsis,
),
),
),
)
);
}
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home : Scaffold(
body: GestureDetector(
onTap: () {
print('点击了按钮');
},
child: Container(
width: 200,
height: 600,
alignment: Alignment.bottomLeft,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.blue,
borderRadius: BorderRadius.circular(20),
border: Border.all(
color: Colors.black,
width: 4,
),
),
margin: EdgeInsets.only(top: 20, left: 40),
padding: EdgeInsets.only(top: 10, bottom: 20, left: 30, right: 40),
child: Text(
'hedafaf ' * 104,
textDirection: TextDirection.ltr,
style: TextStyle(
color: Colors.red,
fontSize: 24,
),
textAlign: TextAlign.center,
maxLines: 3,
overflow: TextOverflow.ellipsis,
),
),
),
),
)
);
}
点击图片,得到反馈