Skip to content

Commit

Permalink
Merge pull request #12 from organic-nailer/dev
Browse files Browse the repository at this point in the history
works pageの修正
  • Loading branch information
organic-nailer authored Dec 1, 2021
2 parents 3d37a1f + 251d853 commit 3507e03
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 84 deletions.
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class MyApp extends StatelessWidget {
path: "/works/:wid",
pageBuilder: (context, state) {
final wid = state.params["wid"]!;
final data = MicroCMSDataStore.worksData.contents;
final data = MicroCMSDataStore.worksData;
final work = data.firstWhere((e) => e.id == wid,
orElse: () => throw Exception("works not found: $wid"));

Expand Down
12 changes: 8 additions & 4 deletions lib/works_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class _WorksPageState extends State<WorksPage> {
super.initState();
final source = MicroCMSDataStore.worksData;
//新しい順に並べる
items = source.contents
items = source
..sort((a, b) =>
b.create.millisecondsSinceEpoch - a.create.millisecondsSinceEpoch);
for (var item in items) {
Expand Down Expand Up @@ -105,18 +105,22 @@ class _WorksPageState extends State<WorksPage> {
size: 180),
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
padding: const EdgeInsets.only(top: 16.0),
child: Text(
data.title,
textAlign: TextAlign.center,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context)
.textTheme
.headline4
?.merge(const TextStyle(height: 1)),
//style: FastTheme.of(context).theme.textTheme.bodyText1,
),
),
Padding(
padding: const EdgeInsets.all(16.0),
padding: const EdgeInsets.only(
top: 16, left: 16, right: 16),
child: Text(data.short_text ?? "",
maxLines: 2,
overflow: TextOverflow.ellipsis,
Expand Down
79 changes: 1 addition & 78 deletions pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
_fe_analyzer_shared:
dependency: transitive
description:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "30.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "2.7.0"
args:
dependency: transitive
description:
Expand All @@ -36,13 +22,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
build:
dependency: transitive
description:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
characters:
dependency: transitive
description:
Expand All @@ -57,13 +36,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
cli_util:
dependency: transitive
description:
name: cli_util
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.5"
clippy_flutter:
dependency: "direct main"
description:
Expand All @@ -85,13 +57,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -120,13 +85,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.2"
flutter:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -158,13 +116,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
glob:
dependency: transitive
description:
name: glob
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
go_router:
dependency: "direct main"
description:
Expand Down Expand Up @@ -214,13 +165,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
matcher:
dependency: transitive
description:
Expand All @@ -235,13 +179,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
package_config:
dependency: transitive
description:
name: package_config
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
path:
dependency: transitive
description:
Expand Down Expand Up @@ -270,13 +207,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.0+1"
pub_semver:
dependency: transitive
description:
name: pub_semver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
rive:
dependency: "direct main"
description:
Expand Down Expand Up @@ -309,7 +239,7 @@ packages:
name: static_micro_cms
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.1"
version: "0.2.0"
stream_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -401,13 +331,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
watcher:
dependency: transitive
description:
name: watcher
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
webview_flutter:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
static_micro_cms: ^0.1.1
static_micro_cms: 0.2.0

# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
Expand Down

0 comments on commit 3507e03

Please sign in to comment.