v1.0.7flutter_titled_container
यह विजेट एक कंटेनर के ऊपर एक शीर्षक प्रदर्शित करता है। आप इसके लिए शीर्षक, संरेखण, शीर्षक रंग, फ़ॉन्ट आकार, और पृष्ठभूमि रंग निर्दिष्ट कर सकते हैं।
johandb/flutter_titled_container open-source repository details.
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
Display a title on top of the Container.
The widget works best with a child container : Container
You can set the following properties :
See the screenshot

import 'package:flutter/material.dart';
import 'package:flutter_titled_container/flutter_titled_container.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
centerTitle: true,
title: Text('Titled Container'),
),
body: Center(
child: TitledContainer(
titleColor: Colors.blue,
title: 'Container Title',
textAlign: TextAlignTitledContainer.Center,
fontSize: 16.0,
backgroundColor: Colors.white,
child: Container(
width: 250.0,
height: 200.0,
decoration: BoxDecoration(
border: Border.all(
color: Colors.blue,
),
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
),
child: Center(
child: Text(
'Some text',
style: TextStyle(fontSize: 28.0),
),
),
),
),
),
);
}
}
निर्भरता सूची 2 आइटम
{"sdk":"flutter"}{"sdk":"flutter"}उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗