mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-04-28 18:39:26 -05:00
refactor: move screens to screens folder
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:git_touch/screens/screens.dart';
|
||||
import '../screens/screens.dart';
|
||||
|
||||
class Avatar extends StatelessWidget {
|
||||
final String login;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:git_touch/screens/screens.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:git_touch/widgets/widgets.dart';
|
||||
import '../screens/screens.dart';
|
||||
import '../utils/utils.dart';
|
||||
import '../widgets/widgets.dart';
|
||||
|
||||
/// Events types:
|
||||
///
|
||||
@@ -159,41 +159,47 @@ class EventItem extends StatelessWidget {
|
||||
|
||||
@override
|
||||
build(context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(color: CupertinoColors.lightBackgroundGray))),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
return Material(
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom:
|
||||
BorderSide(color: CupertinoColors.lightBackgroundGray))),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Avatar(event.actor.login, event.actor.avatarUrl),
|
||||
Padding(padding: EdgeInsets.only(left: 10)),
|
||||
Expanded(
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(color: Color(0xff24292e), height: 1.2),
|
||||
children: <TextSpan>[
|
||||
_buildLink(context, event.actor.login,
|
||||
() => UserScreen(event.actor.login)),
|
||||
_buildEvent(context),
|
||||
],
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Avatar(event.actor.login, event.actor.avatarUrl),
|
||||
Padding(padding: EdgeInsets.only(left: 10)),
|
||||
Expanded(
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(color: Color(0xff24292e), height: 1.2),
|
||||
children: <TextSpan>[
|
||||
_buildLink(context, event.actor.login,
|
||||
() => UserScreen(event.actor.login)),
|
||||
_buildEvent(context),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(padding: EdgeInsets.only(left: 10)),
|
||||
Icon(_buildIconData(context),
|
||||
color: CupertinoColors.inactiveGray),
|
||||
],
|
||||
),
|
||||
Padding(padding: EdgeInsets.only(left: 10)),
|
||||
Icon(_buildIconData(context),
|
||||
color: CupertinoColors.inactiveGray),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 42, top: 8),
|
||||
child: Text(_buildComment(),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(color: Color(0xffaaaaaa))))
|
||||
],
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 42, top: 8),
|
||||
child: Text(_buildComment(),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(color: Color(0xffaaaaaa))))
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@ class NotificationItem extends StatelessWidget {
|
||||
case 'PullRequest':
|
||||
// return IssueScreen(item.repository.);
|
||||
default:
|
||||
throw new Exception('Unhandled notification type: $type');
|
||||
// throw new Exception('Unhandled notification type: $type');
|
||||
return Text('test');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +32,7 @@ class NotificationItem extends StatelessWidget {
|
||||
return Octicons.git_pull_request;
|
||||
// color: Color.fromRGBO(0x6f, 0x42, 0xc1, 1),
|
||||
default:
|
||||
throw new Exception('Unhandled icon type: $type');
|
||||
return Octicons.person;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,13 +51,18 @@ class NotificationItem extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Icon(_buildIconData(item.subject.type),
|
||||
color: CupertinoColors.inactiveGray),
|
||||
child: Icon(
|
||||
_buildIconData(item.subject.type),
|
||||
// color: CupertinoColors.inactiveGray,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(bottom: BorderSide(color: Colors.grey))),
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
// color: Colors.grey,
|
||||
))),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
@@ -78,7 +84,7 @@ class NotificationItem extends StatelessWidget {
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Icon(
|
||||
Octicons.check,
|
||||
color: CupertinoColors.inactiveGray,
|
||||
// color: CupertinoColors.inactiveGray,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user