Widget _createDebugInfoCard()

in frontend/frontend-flutter/lib/main.dart [1853:1920]


  Widget _createDebugInfoCard(Widget leading, String title, String subtitle,
      String imageTrailingPath, Widget info, String infoText) {
    final ButtonStyle flatButtonStyle = TextButton.styleFrom(
      shape: const RoundedRectangleBorder(
        borderRadius: BorderRadius.all(Radius.circular(4.0)),
      ),
    );
    return Padding(
      padding: const EdgeInsets.symmetric(horizontal: 12.0),
      child: ExpansionTileCard(
        //key: cardA,
        initiallyExpanded: true,
        leading: leading,
        title: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          mainAxisSize: MainAxisSize.max,
          children: [
            Flexible(
              flex: 5,
              child: Text(title, style: TextStyle(fontWeight: FontWeight.bold)),
            ),
            Flexible(
                flex: 1,
                child: Image.asset(width: 75, height: 75, imageTrailingPath))
          ],
        ),
        subtitle: Text(subtitle, style: TextStyle(fontSize: 12)),
        children: <Widget>[
          const Divider(
            thickness: 1.0,
            height: 1.0,
          ),
          Align(
            alignment: Alignment.centerLeft,
            child: Padding(
              padding: const EdgeInsets.symmetric(
                horizontal: 16.0,
                vertical: 8.0,
              ),
              child: info,
            ),
          ),
          ButtonBar(
            alignment: MainAxisAlignment.spaceBetween,
            buttonHeight: 52.0,
            buttonMinWidth: 90.0,
            children: <Widget>[
              TextButton(
                style: flatButtonStyle,
                onPressed: () async {
                  await Clipboard.setData(ClipboardData(text: infoText));
                },
                child: const Column(
                  children: <Widget>[
                    Icon(Icons.copy),
                    Padding(
                      padding: EdgeInsets.symmetric(vertical: 2.0),
                    ),
                    Text('Copy'),
                  ],
                ),
              ),
            ],
          ),
        ],
      ),
    );
  }