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

I want the border to be a rectangle, not a circle how do I set that #2

Open
hlovingness opened this issue Nov 22, 2019 · 2 comments
Open

Comments

@hlovingness
Copy link

I want the border to be a rectangle, not a circle how do I set that

@anikkcah
Copy link

Filename: circle.dart
change the below mentioned line in 'Widget build(BuildContext context)' function to change the border elements.

 @override
  Widget build(BuildContext context) {
    final TextStyle style = Theme.of(context).textTheme.body1.copyWith(
          color: Colors.deepPurple,
        );
    return Container(
      height: 40.0,
      width: 40.0,
      decoration: BoxDecoration(
          shape: BoxShape.rectangle, //I have changed the shape here 
          color: index.isEven ? Colors.red : Colors.pink),
      child: Center(
          child: Text(
        '$index',
        style: style,
      )),
    );
  }

@hlovingness
Copy link
Author

thinks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants