Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkbox, Radio, and Switch stretch #484

Closed
jpnurmi opened this issue Jan 11, 2023 · 0 comments · Fixed by #490
Closed

Checkbox, Radio, and Switch stretch #484

jpnurmi opened this issue Jan 11, 2023 · 0 comments · Fixed by #490
Assignees
Labels
bug Something isn't working

Comments

@jpnurmi
Copy link
Member

jpnurmi commented Jan 11, 2023

image

import 'package:flutter/material.dart';
import 'package:yaru/yaru.dart';
import 'package:yaru_widgets/yaru_widgets.dart';

void main() {
  runApp(
    YaruTheme(
      builder: (context, yaru, child) => MaterialApp(
        theme: yaru.theme,
        darkTheme: yaru.darkTheme,
        home: const MyHomePage(),
      ),
    ),
  );
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Padding(
        padding: const EdgeInsets.all(kYaruPagePadding),
        child: Table(
          border: TableBorder.all(color: Theme.of(context).dividerColor),
          children: [
            const TableRow(
              children: [
                SizedBox.shrink(),
                Text('Material'),
                Text('Yaru'),
              ],
            ),
            TableRow(
              children: [
                const Text('Checkbox'),
                Checkbox(value: true, onChanged: (_) {}),
                YaruCheckbox(value: true, onChanged: (_) {}),
              ],
            ),
            TableRow(
              children: [
                const Text('Radio'),
                Radio(value: true, groupValue: true, onChanged: (_) {}),
                YaruRadio(value: true, groupValue: true, onChanged: (_) {}),
              ],
            ),
            TableRow(
              children: [
                const Text('Switch'),
                Switch(value: true, onChanged: (_) {}),
                YaruSwitch(value: true, onChanged: (_) {}),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
@Feichtmeier Feichtmeier added the bug Something isn't working label Jan 11, 2023
@Jupi007 Jupi007 self-assigned this Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants