65 lines
1.9 KiB
Dart
65 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
||
import 'package:flutter/widgets.dart';
|
||
import 'package:get/get_state_manager/src/simple/get_view.dart';
|
||
import 'package:version_01/modules/profile/profile_controller.dart';
|
||
|
||
class ProfilePage extends GetView<ProfileController> {
|
||
const ProfilePage({super.key});
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return Scaffold(
|
||
body: SingleChildScrollView(
|
||
padding: EdgeInsets.all(16),
|
||
child: Column(
|
||
crossAxisAlignment: CrossAxisAlignment.center,
|
||
children: [
|
||
CircleAvatar(
|
||
radius: 60,
|
||
backgroundImage: NetworkImage(
|
||
"https://mastodon.tn/system/accounts/avatars/114/399/394/324/031/602/original/85d840449fbc65db.png",
|
||
),
|
||
),
|
||
SizedBox(height: 16),
|
||
InfoCard(
|
||
title: "İsim",
|
||
value: controller.account.value?.name ?? '',
|
||
),
|
||
InfoCard(
|
||
title: "Soyisim",
|
||
value: controller.account.value?.surname ?? '',
|
||
),
|
||
InfoCard(
|
||
title: "Kullanıcı adı",
|
||
value: '@${controller.account.value?.username}',
|
||
),
|
||
ElevatedButton(
|
||
onPressed: () => controller.AccountSignOut(),
|
||
child: Text("Çıkış Yap"),
|
||
style: ElevatedButton.styleFrom(backgroundColor: Colors.amber),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
);
|
||
}
|
||
}
|
||
|
||
class InfoCard extends StatelessWidget {
|
||
final String title, value;
|
||
const InfoCard({super.key, required this.title, required this.value});
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return Card(
|
||
child: ListTile(
|
||
title: Text(title),
|
||
subtitle: Text(
|
||
value,
|
||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||
),
|
||
),
|
||
);
|
||
}
|
||
}
|