replace: swap prosappweb content for prosapp_web_app (more complete version)
prosapp_web_app has chat, dashboard, calendar, support, 13 providers and Fluro URL routing. Keep Dockerfile + nginx.conf from previous prosappweb. Upgrade google_fonts 6.2.1 → 8.1.0 (Dart 3.12 compat fix). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
74a4f41902
commit
15175c1b91
@@ -0,0 +1,71 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:prosapp_web_app/providers/auth_provider.dart';
|
||||
import 'package:prosapp_web_app/providers/professional_provider.dart';
|
||||
import 'package:prosapp_web_app/providers/score_provider.dart';
|
||||
|
||||
import 'package:prosapp_web_app/providers/sidemenu_provider.dart';
|
||||
|
||||
import 'package:prosapp_web_app/ui/shared/widgets/navbar_avatar.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class Navbar extends StatelessWidget {
|
||||
const Navbar({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final size = MediaQuery.of(context).size;
|
||||
|
||||
final professionalProvider = Provider.of<ProfessionalProvider>(context);
|
||||
final scoreProvider = Provider.of<ScoreProvider>(context, listen: false);
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
scoreProvider.loadReputation(context.read<AuthProvider>().user!.id);
|
||||
});
|
||||
|
||||
return Consumer<ScoreProvider>(builder: (context, scoreProvider, child) {
|
||||
final reputation = scoreProvider.reputation;
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
height: 50,
|
||||
decoration: buildBoxDecoration(),
|
||||
child: Row(
|
||||
children: [
|
||||
if (size.width <= 700) ...[
|
||||
IconButton(
|
||||
icon: const Icon(Icons.menu_outlined),
|
||||
onPressed: () => SideMenuProvider.openMenu(),
|
||||
),
|
||||
],
|
||||
const SizedBox(width: 5),
|
||||
const Spacer(),
|
||||
Row(
|
||||
children: [
|
||||
Icon(Icons.star, color: Colors.yellow[600], size: 15),
|
||||
const SizedBox(width: 2),
|
||||
Text(
|
||||
professionalProvider.isProModeActive
|
||||
? reputation.averagePro.toStringAsFixed(2)
|
||||
: reputation.average.toStringAsFixed(2),
|
||||
style: const TextStyle(fontSize: 15),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
const NavbarAvatar(),
|
||||
const SizedBox(width: 10),
|
||||
],
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
BoxDecoration buildBoxDecoration() {
|
||||
return const BoxDecoration(color: Colors.white, boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black12,
|
||||
blurRadius: 5,
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user