Skip to content

Commit 32cd261

Browse files
shaileshmishrashaileshmishra
authored andcommitted
🔥 improved code file
1 parent 4ce5b37 commit 32cd261

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1050
-934
lines changed

assets/images/wall.jpg

-6.29 KB
Binary file not shown.

assets/srcn/six.png

-505 KB
Binary file not shown.

lib/components/_border_radius.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import 'package:flutter/material.dart';
2+
3+
const borderRadius = BorderRadius.all(
4+
const Radius.circular(10.0),
5+
);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:get/get.dart';
3+
4+
Container closeActivity() {
5+
return Container(
6+
child: GestureDetector(
7+
onTap: () => Get.back(),
8+
child: Padding(
9+
padding: EdgeInsets.all(10),
10+
child: CircleAvatar(
11+
child: Icon(
12+
Icons.close,
13+
color: Colors.white,
14+
),
15+
),
16+
),
17+
),
18+
);
19+
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class CustomInputField extends StatelessWidget {
1010
Widget build(BuildContext context) {
1111
return Container(
1212
width: 350,
13-
//height: 50,
1413
child: Material(
1514
elevation: 5.0,
1615
borderRadius: BorderRadius.all(Radius.circular(10.0)),

lib/components/_star_rating.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:smooth_star_rating/smooth_star_rating.dart';
3+
4+
showStarRating(rating, color) {
5+
return SmoothStarRating(
6+
allowHalfRating: false,
7+
onRated: (v) {},
8+
starCount: 5,
9+
rating: rating,
10+
size: 20.0,
11+
isReadOnly: true,
12+
halfFilledIconData: Icons.blur_on,
13+
color: color,
14+
borderColor: Colors.grey.shade400,
15+
spacing: 0.0);
16+
}

lib/constant.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import 'package:flutter/material.dart';
2+
3+
const double kSpace = 10;
4+
const kPrimaryColor = Color(0xFF3366FF);
5+
const kPrimaryLightColor = Color(0xFF00CCFF);
6+
const kPrimaryGradientColor = LinearGradient(
7+
begin: Alignment.topLeft,
8+
end: Alignment.bottomRight,
9+
colors: [Color(0xFF3366FF), Color(0xFF00CCFF)],
10+
);
11+
const kSecondaryColor = Color(0xFF979797);
12+
const kTextColor = Color(0xFF757575);

lib/helper/_keyboard.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import 'package:flutter/cupertino.dart';
2+
3+
class KeyboardUtil {
4+
static void hideKeyboard(BuildContext context) {
5+
FocusScopeNode currentFocus = FocusScope.of(context);
6+
if (!currentFocus.hasPrimaryFocus) {
7+
currentFocus.unfocus();
8+
}
9+
}
10+
}

lib/main.dart

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
11
import 'package:flutter/material.dart';
2-
import 'package:flutter_ecommerce_app/src/view/home/HomePage.dart';
2+
import 'package:flutter_ecommerce_app/screen/home/home_page.dart';
3+
import 'package:get/get_navigation/src/root/get_material_app.dart';
34

4-
void main() {
5-
runApp(EcommApp());
6-
}
7-
8-
class EcommApp extends StatelessWidget {
9-
@override
10-
Widget build(BuildContext context) {
11-
return MaterialApp(
12-
title: 'Flutter Demo',
13-
debugShowCheckedModeBanner: false,
14-
theme: ThemeData(
15-
primarySwatch: Colors.blue,
16-
visualDensity: VisualDensity.adaptivePlatformDensity,
17-
),
18-
home: HomePage(title: 'Login'),
19-
);
20-
}
21-
}
5+
void main() => runApp(GetMaterialApp(
6+
home: HomePage(),
7+
));

0 commit comments

Comments
 (0)