Skip to content

Commit

Permalink
Added LogoWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
niloysikdar committed May 2, 2021
1 parent f562079 commit 9134f6a
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
Binary file added assets/icons/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions lib/screens/homescreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ import 'package:plaso_connect/screens/selectoxygen.dart';
import 'package:plaso_connect/screens/selectplasma.dart';
import 'package:plaso_connect/screens/statdashboard.dart';
import 'package:plaso_connect/widgets/boxdecoration.dart';
import 'package:plaso_connect/widgets/logowidget.dart';

class HomeScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
return SafeArea(
child: Scaffold(
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
logoWidget(size: size),
Padding(
padding: const EdgeInsets.only(left: 30, bottom: 15),
child: Text(
Expand Down
30 changes: 30 additions & 0 deletions lib/widgets/logowidget.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import 'package:flutter/material.dart';
import 'package:plaso_connect/constants/colors.dart';

Widget logoWidget({required Size size}) {
return Container(
margin: EdgeInsets.symmetric(vertical: 30),
height: size.width * 0.35,
width: size.width * 0.35,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(1000),
image: DecorationImage(
image: AssetImage("assets/icons/logo.png"),
fit: BoxFit.fill,
),
boxShadow: [
BoxShadow(
color: klightShadowForLight,
offset: Offset(-4.0, -4.0),
blurRadius: 7.0,
),
BoxShadow(
color: kdarkShadowForLight,
offset: Offset(4.0, 4.0),
blurRadius: 7.0,
),
],
color: Color(0xFFEFEEEE),
),
);
}
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ flutter:
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/
- assets/icons/

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
Expand Down

0 comments on commit 9134f6a

Please sign in to comment.