How to right Side Border to a Container in flutter

Viewed 2855

How can one add right Side Border to a Container in flutter?.

1 Answers

Since you have not provided us with any code and any clear explanation on what you want, so I am going to assume you just want a right border of a container to be visible.

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Container(
          height: 100,
          width: 100,
          decoration: BoxDecoration(
            border: Border(
              right: BorderSide( //                   <--- right side
                color: Colors.black,
                width: 3.0,
              ),
            )
          ),
          child: Center(
            child: Text("TEXT")
          )
        )
      ),
    );
  }
}

An image for understanding. image

Related