Commit 0992309f by Mobile : Jetrin Phuekkaew (N'new)

Merge branch 'develop' of https://gitlab.2fellows.com/art/feelver into develop

parents 03834434 328872f2
import 'package:feelverapp/ui/account_setting/account_setting_page.dart';
import 'package:feelverapp/ui/my_reviews/my_reviews_page.dart';
import 'package:feelverapp/ui/notification/notification_page.dart';
import 'package:feelverapp/ui/other_menu/other_menu_page.dart';
import 'package:flutter/material.dart';
import 'ui/splashscreen/splash_screen_page.dart';
......@@ -14,8 +16,8 @@ class MyApp extends StatelessWidget {
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: AccountSettingPage(),
// home: SplashScreenPage(),
// home: NotificationPage(),
home: SplashScreenPage(),
);
}
}
import 'package:flutter/material.dart';
import 'SizeConfig.dart';
class RatingStar extends StatelessWidget {
final double rate;
final double starSize;
final bool isRating;
final Function onChangeRate;
RatingStar({
@required this.rate,
this.isRating = false,
this.starSize = 16,
this.onChangeRate,
});
@override
Widget build(BuildContext context) {
return Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [1.0, 2.0, 3.0, 4.0, 5.0].map((index) {
return GestureDetector(
onTap: !this.isRating
? null
: () {
onChangeRate(index);
},
child: _star(context, index),
);
}).toList(),
),
);
}
Widget _star(BuildContext context, double index) {
if (index <= rate) {
return Icon(Icons.star,
color: Colors.yellow,
size: SizeConfig.getFontSize(this.starSize));
} else if (index > rate && index < rate + 1) {
return Icon(Icons.star,
color: Colors.yellow,
size: SizeConfig.getFontSize(this.starSize));
} else {
return Icon(Icons.star_border,
color: Colors.yellow,
size: SizeConfig.getFontSize(this.starSize));
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment