-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from leoafarias/feature/github-trending
Added github trending and cleaned up packages screen
- Loading branch information
Showing
26 changed files
with
1,107 additions
and
669 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
lib/src/modules/packages/components/flutter_favorite_list_item.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/rendering.dart'; | ||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; | ||
import 'package:sidekick/generated/l10n.dart'; | ||
import 'package:sidekick/src/modules/packages/flutter_favorite.dto.dart'; | ||
|
||
import '../../../components/atoms/typography.dart'; | ||
import '../../../modules/common/utils/open_link.dart'; | ||
import '../../common/molecules/list_tile.dart'; | ||
import 'package_score_display.dart'; | ||
|
||
/// Flutter favorite list item | ||
class FlutterFavoriteListItem extends StatelessWidget { | ||
/// Constructor | ||
const FlutterFavoriteListItem( | ||
this.package, { | ||
Key key, | ||
this.position, | ||
}) : super(key: key); | ||
|
||
/// Detail of a package | ||
final FlutterFavorite package; | ||
|
||
/// Popular position of package | ||
final int position; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
children: [ | ||
SkListTile( | ||
title: Text(package.name), | ||
subtitle: Text( | ||
package.description, | ||
maxLines: 2, | ||
style: Theme.of(context).textTheme.caption, | ||
), | ||
trailing: PackageScoreDisplay(score: package.score), | ||
), | ||
Row( | ||
children: [ | ||
Expanded( | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.start, | ||
children: [ | ||
const SizedBox(width: 20), | ||
Caption(package.version), | ||
Spacer(), | ||
Tooltip( | ||
message: S.of(context).details, | ||
child: IconButton( | ||
iconSize: 20, | ||
splashRadius: 20, | ||
icon: const Icon(MdiIcons.informationOutline), | ||
onPressed: () async { | ||
await openLink(package.url); | ||
}, | ||
), | ||
), | ||
const SizedBox(width: 10), | ||
const Text('·'), | ||
const SizedBox(width: 10), | ||
Tooltip( | ||
message: S.of(context).changelog, | ||
child: IconButton( | ||
iconSize: 20, | ||
splashRadius: 20, | ||
icon: const Icon(MdiIcons.textBox), | ||
onPressed: () async { | ||
await openLink(package.changelogUrl); | ||
}, | ||
), | ||
), | ||
const SizedBox(width: 10), | ||
const Text('·'), | ||
const SizedBox(width: 10), | ||
Tooltip( | ||
message: S.of(context).website, | ||
child: IconButton( | ||
iconSize: 20, | ||
splashRadius: 20, | ||
icon: const Icon(MdiIcons.earth), | ||
onPressed: () async { | ||
await openLink(package.url); | ||
}, | ||
), | ||
), | ||
const SizedBox(width: 10), | ||
], | ||
), | ||
) | ||
], | ||
), | ||
], | ||
); | ||
} | ||
} |
54 changes: 0 additions & 54 deletions
54
lib/src/modules/packages/components/package_github_info.dart
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.