🎙️ INTRO (0:00 – 0:40) Namaste Doston! 👋 Main hoon [Your Name] aur aaj ke video mein hum baat karne wale hain C# 14.0 ke Top 10 Most Important Features ke baare mein. Ye update .NET 10 ke saath aaya hai aur C# ko aur zyada modern, clean aur developer-friendly banata hai. Main har feature ko simple example ke saath samjhaunga taaki aapko coding mein easily use kar paayein. So let’s start — C# 14 ke naye power-packed features! 🚀 🧩 1️⃣ Field-backed Properties (0:40 – 1:00) Pehla feature hai — Field-backed Properties Ab aapko manually private field likhne ki zarurat nahi. C# 14 mein ek naya contextual keyword aaya hai — field public string Name { get ; set => field = value ?? throw new ArgumentNullException( nameof ( value )); } Yahaan field compiler-generated backing field ko represent karta hai. Validation ya logic likhna ab super easy ho gaya hai! 🧩 2️⃣ Extension Members (1:00 – 1:25) Dusra feature — Extension Members Pehle hum si...
Flutter Card Widget Example | Card Widget complete code in flutter
import 'package:flutter/material.dart';
class Cardwidget extends StatelessWidget{
const Cardwidget({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Welcome in Card Widget"),
),
body: Center(
child: Container(
width: 320,
height: 220,
padding: EdgeInsets.all(10.0),
child:Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
color: Colors.red,
elevation: 10,
child: Column(
mainAxisSize: MainAxisSize.min,
children:<Widget>[
const ListTile(
leading: Icon(Icons.album, size: 60),
title: Text(
'Sonu Nigam',
style: TextStyle(fontSize: 30.0)
),
subtitle: Text(
'Best of Sonu Nigam Music.',
style: TextStyle(fontSize: 18.0)
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
ElevatedButton(
child: const Text('Play'),
onPressed: () {/* ... */},
),
SizedBox(width: 8), // Adds some spacing between buttons
ElevatedButton(
child: const Text('Pause'),
onPressed: () {/* ... */},
),
],
)
],
)
),
),
),
);
}
}
Comments
Post a Comment
POST Answer of Questions and ASK to Doubt