Skip to content

Instantly share code, notes, and snippets.

@prakhart111
Created April 12, 2025 14:27
Show Gist options
  • Save prakhart111/bd698629e6d2cec02e0f54b3d641f70d to your computer and use it in GitHub Desktop.
Save prakhart111/bd698629e6d2cec02e0f54b3d641f70d to your computer and use it in GitHub Desktop.
Snippet created via Remix API
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: LandingPage(),
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
);
}
}
class LandingPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// Header Section
Container(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 30),
color: Colors.blue[50],
child: Column(
children: [
Text(
'Welcome to Our App',
style: TextStyle(
fontSize: 32,
fontWeight: FontWeight.bold,
color: Colors.blue[800],
),
textAlign: TextAlign.center,
),
SizedBox(height: 20),
Text(
'Discover amazing features that make your life easier',
style: TextStyle(
fontSize: 18,
color: Colors.blue[600],
),
textAlign: TextAlign.center,
),
],
),
),
// Features Section
Padding(
padding: EdgeInsets.all(20),
child: Column(
children: [
_buildFeatureCard(
icon: Icons.speed,
title: 'Fast Performance',
description: 'Blazing fast and efficient application',
),
SizedBox(height: 15),
_buildFeatureCard(
icon: Icons.security,
title: 'Secure',
description: 'Top-notch security for your data',
),
SizedBox(height: 15),
_buildFeatureCard(
icon: Icons.design_services,
title: 'Beautiful Design',
description: 'Intuitive and modern user interface',
),
],
),
),
// Call to Action
Padding(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 30),
child: ElevatedButton(
onPressed: () {
// Add navigation or action
},
style: ElevatedButton.styleFrom(
primary: Colors.blue[700],
padding: EdgeInsets.symmetric(vertical: 15),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
),
child: Text(
'Get Started',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
),
),
);
}
Widget _buildFeatureCard({
required IconData icon,
required String title,
required String description,
}) {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: Colors.blue.withOpacity(0.1),
spreadRadius: 2,
blurRadius: 5,
offset: Offset(0, 3),
),
],
),
child: ListTile(
leading: Icon(
icon,
color: Colors.blue[700],
size: 40,
),
title: Text(
title,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
subtitle: Text(
description,
style: TextStyle(
color: Colors.grey[600],
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment