import 'package:flutter/material.dart';

class GymLinkAppBar extends StatelessWidget implements PreferredSizeWidget {
  const GymLinkAppBar({super.key});

  @override
  Widget build(BuildContext context) {
    return AppBar(
      backgroundColor: Theme.of(context).scaffoldBackgroundColor,
      shadowColor: null,
      automaticallyImplyLeading: false,
      elevation: 0,
      scrolledUnderElevation: 4,
      title: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          const Padding(
            padding: EdgeInsets.only(right: 8),
            child: Image(
                image: AssetImage('assets/logo.png'), width: 24, height: 24),
          ),
          Align(
            alignment: Alignment.centerRight,
            child: Text(
              'Powered by GymLink',
              style: Theme.of(context).textTheme.titleSmall,
            ),
          ),
        ],
      ),
      toolbarHeight: 30,
    );
  }

  @override
  Size get preferredSize => const Size.fromHeight(30);
}
