coingaming / moon_flutter

Moon Design System for Flutter
https://flutter.moon.io
MIT License
196 stars 24 forks source link

Can't interact with MoonTextInput inside MoonAccordion #422

Closed lukepighetti closed 4 months ago

lukepighetti commented 4 months ago

When you place a MoonTextInput inside a MoonAccordion, it is not interactive

https://github.com/coingaming/moon_flutter/assets/666539/42489c59-8fb1-4fc5-afe1-19037a98d098

import 'package:flutter/material.dart';
import 'package:moon_design/moon_design.dart';

class HomeRoute extends StatelessWidget {
  const HomeRoute({super.key});

  @override
  Widget build(BuildContext context) {
    return Material(
      child: ListView(
        padding: EdgeInsets.all(20),
        children: [
          MoonAccordion(
            label: Text("Test"),
            childrenPadding: EdgeInsets.all(4),
            children: [
              MoonTextInput(
                hintText: "Yo",
              ),
              SizedBox(height: 4),
              MoonTextInput(),
              SizedBox(height: 4),
              MoonTextInput(),
            ],
          ),
        ],
      ),
    );
  }
}
lukepighetti commented 4 months ago

If you enable hasContentOutside: true, they become interactive, but the accordion design changes

Kypsis commented 4 months ago

@lukepighetti fixed in latest release. Good catch btw.