Skip to content

Commit

Permalink
update header to use updated Video proto message
Browse files Browse the repository at this point in the history
  • Loading branch information
deep-diver committed Jun 7, 2021
1 parent a597771 commit 5b323e3
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions client/lib/widgets/detail/header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,11 @@ import 'package:pr12er/protos/pkg/pr12er/messages.pb.dart';

// ignore: must_be_immutable
class HeaderWidget extends StatelessWidget {
// this is a placeholder
// numberOfViews should be replaced in the next PR
// by defining numberOfViews in Video proto message
int numberOfViews = 0;

// this is a placeholder
// didILIkedIt should be replaced in the next future PR
// after defining user related information
bool didILikedIt = false;

// this is a placeholder
// date should be replaced in the next future PR
// by defining numberOfViews in Video proto message
String date = "2017.4.22";

late Video video;

HeaderWidget({Key? key, required this.video}) : super(key: key);
Expand Down Expand Up @@ -51,7 +41,8 @@ class HeaderWidget extends StatelessWidget {
const SizedBox(width: 8),
const Icon(Icons.remove_red_eye),
const SizedBox(width: 8),
Text(numberOfViews.toString(), style: const TextStyle(fontSize: 18)),
Text(video.numberOfViews.toString(),
style: const TextStyle(fontSize: 18)),
const SizedBox(width: 15),
getLikeIcon(),
const SizedBox(width: 8),
Expand All @@ -71,7 +62,7 @@ class HeaderWidget extends StatelessWidget {
return [
const Icon(Icons.today),
const SizedBox(width: 8),
Text(date, style: const TextStyle(fontSize: 18))
Text(video.publishedDate, style: const TextStyle(fontSize: 18))
];
}
}

0 comments on commit 5b323e3

Please sign in to comment.