Fakultas Ilmu Komputer UI

Commit 6a86b7e6 authored by Yoga Pratama's avatar Yoga Pratama
Browse files

[CHORES] Fix image initials name

parent a341974e
Pipeline #77338 failed with stages
in 12 minutes and 20 seconds
......@@ -118,13 +118,14 @@ class _DetailPostPageState extends State<DetailPostPage> {
key: Key(choice),
child: ElevatedButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(
EdgeInsets.symmetric(vertical: 0, horizontal: 0)
),
backgroundColor: MaterialStateProperty.all(Colors.white),
foregroundColor: MaterialStateProperty.all(Colors.black),
elevation: MaterialStateProperty.all(0)
),
padding: MaterialStateProperty.all(
EdgeInsets.symmetric(
vertical: 0, horizontal: 0)),
backgroundColor:
MaterialStateProperty.all(Colors.white),
foregroundColor:
MaterialStateProperty.all(Colors.black),
elevation: MaterialStateProperty.all(0)),
onPressed: _updateInformasi,
child: SizedBox(
width: double.infinity,
......@@ -365,13 +366,15 @@ class _DetailPostPageState extends State<DetailPostPage> {
key: const Key('Button Tambah Komentar'),
style: ButtonStyle(
padding: MaterialStateProperty.all(
EdgeInsets.symmetric(vertical: 13)
),
EdgeInsets.symmetric(vertical: 13)),
elevation: MaterialStateProperty.all(0.0),
backgroundColor: MaterialStateProperty.all(greenPrimary),
shape: MaterialStateProperty.all(RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10))
)),
backgroundColor:
MaterialStateProperty.all(
greenPrimary),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(10)))),
),
onPressed: () {
_checkLoginStatus();
......@@ -519,10 +522,12 @@ class _DetailPostPageState extends State<DetailPostPage> {
}
String _creatorInitials(String name) {
if (name.isEmpty) return '';
var initials = '';
for (final i in name.split(' ')) {
initials += '${i[0].toUpperCase()}';
}
if (initials.length > 2) return initials.substring(0, 2);
return initials;
}
......
......@@ -588,10 +588,12 @@ class _DetailPostKegiatanPageState extends State<DetailPostKegiatanPage> {
}
String _creatorInitials(String name) {
if (name.isEmpty) return '';
var initials = '';
for (final i in name.split(' ')) {
initials += '${i[0].toUpperCase()}';
}
if (initials.length > 2) return initials.substring(0, 2);
return initials;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment