import 'package:flutter/material.dart';

import 'package:get/get.dart';

import 'package:f0ckapp/controller/mediacontroller.dart';

class TagFooter extends StatelessWidget {
  final MediaController mediaController = Get.find<MediaController>();

  TagFooter({super.key});

  @override
  Widget build(BuildContext context) {
    return Obx(() {
      if (mediaController.tag.value != null) {
        return Center(
          child: InputChip(
            label: Text(mediaController.tag.value!),
            onDeleted: () {
              mediaController.setTag(null);
              Get.offAllNamed('/');
            },
          ),
        );
      } else {
        return const SizedBox.shrink();
      }
    });
  }
}
